mquan / turbo-issues

bug tracking for turbo
0 stars 0 forks source link

Offline socket (socket buffer) #106

Open mquan opened 12 years ago

mquan commented 12 years ago
  1. try catch connecting socket, if it fails then it's offline ==> everywhere that has socket.emit call should be replaced with localstorage and
  2. A better approach is to write a lib that intercepts all socket.emit when socket isn't connected and queue the call (socket, event, data). Once back online the lib automatically emits those. Call it localSocket.

As for receiving data -> the logic upon connection should handle this.