latertime / laterti.me

Messages on a time stream
laterti.me
1 stars 1 forks source link

Socket.io for live communication #6

Closed stuartpb closed 9 years ago

stuartpb commented 10 years ago

Socket.io 1.0 is finally out, so we should move the WebSocket code to Socket.io.

stuartpb commented 9 years ago

Actually, taking another looks at this, the only browser that doesn't support WebSockets natively with any significant userbase today is IE9, which is already lacking support for things like flexbox that the client is being built to rely on.

From the intermediary connection point of view, the last year had Heroku and CloudFlare both add WebSocket support to their platforms, so that's not much of an issue, either.

So, for now, I'm actually okay sticking with ws.

stuartpb commented 9 years ago

Although, really, what I want is something based on Server-Sent Events. https://github.com/andrewrk/connect-sse looks like a good starting point.

stuartpb commented 9 years ago

Okay, ws doesn't handle heartbeats or reconnection... let's just hop on over to engine.io/socket.io.

stuartpb commented 9 years ago

And since engine.io doesn't handle reconnection (idk about heartbeats), make that socket.io.

stuartpb commented 9 years ago

Or, heck, let's just do Primus and engine.io, since that handles all of it. (Which is what I did.)