3 ms·
> and the client side code is about 50 lines and completely resuable and DRY Were you able to implement auto-reconnect with backoff? That's one of the most imp
by dcwca 11y ago
> and the client side code is about 50 lines and completely resuable and DRY
Were you able to implement auto-reconnect with backoff? That's one of the most important features that something like Socket.io gives you.
- coltonv 11y agoRight now just a 3 time retry with hard coded delay between each one.
- jkarneges 11y agoIf you don't need fallback to HTTP, there are some alternative libraries that handle auto reconnect for pure WebSockets: https://github.com/fanout/websockhop https://github.com/fanout/websockhop https://github.com/joewalnes/reconnecting-websocket https://github.com/joewalnes/reconnecting-websocket
- dtf 11y agoAlso, if your traffic is basically one-way like in this example, don't forget Server-Sent Events, which are auto-reconnecting and well supported.