Skip to content
Articles
Article

resilient_ws: WebSocket and SSE clients for Dart that survive bad networks

by Abdeldjalil Chougui dev.to

6 min read

Opening a WebSocket is one line of code. Keeping it open on a phone is the hard part. The user walks into a lift, the phone switches from Wi-Fi to mobile data, the app goes to the background, the access token expires. The socket dies, sometimes with an error and sometimes without a word. So every realtime feature ends up with the same code around the socket: reconnect, but not in a tight loop. Ge…

Forum

Questions about this, or something to add?

Discuss on the forum

Report this · Wrote this? Claim it

FlutterX is supported by