felangel / web_socket_client

A simple WebSocket client for Dart which includes automatic reconnection logic.
https://pub.dev/packages/web_socket_client
MIT License
150 stars 32 forks source link

Expose a method to update connection uri in case of passing token parameter #37

Closed Danny-Hoang closed 3 months ago

Danny-Hoang commented 7 months ago

URI is init each time Websocket instance is create, and reuse it for every reconnect attempt. That is sometime a problem. If I pass a jwt token to the uri then if the token is expired I always have to call the method close and create new WebSocket instance, update the uri with new token. It is convenient if the uri value can be expose and modify outside.

felangel commented 3 months ago

Hi @Danny-Hoang 👋 Thanks for opening an issue! This seems to be a duplicate of #31 so closing in favor of the other issue 👍