Re:Use Phoenix Channels
by ch4s3 on Wednesday August 04, 2021 @12:14PM
(#28062755)
This seem pretty nice. How does it handle things like websocket reconnection?
[ Parent
| on HN ]
Whenever a client connects (whether the first time, or on reconnect) or sends a message, Pushpin sends an HTTP request to a configured backend to retrieve WebSocket messages to be delivered to the client. This can be used to restore state on reconnect.
If you mean how is reconnection handled on the client side, that's up to the client. Pushpin is a server-side component with no client library. But the client could use a WebSocket library with reconnection ability, like reconnecting-websocket.