Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useWebSocket - possibility to update connection settings #1722

Open
4 tasks done
Avaray opened this issue Jun 27, 2022 · 4 comments
Open
4 tasks done

useWebSocket - possibility to update connection settings #1722

Avaray opened this issue Jun 27, 2022 · 4 comments
Labels
enhancement New feature or request pr welcome

Comments

@Avaray
Copy link

Avaray commented Jun 27, 2022

Clear and concise description of the problem

Websocket client works great, but I'm unable to change connection settings.
I wish to be able to pass new settings into open() function, something like:

open(new_address, {new_options})

or
It would be great to have a new function like

update(new_address, {new_options})

...and it will update current connection settings and reconnect. Something like that.

Suggested solution

Provide possibility to update current connection settings.

Alternative

No response

Additional context

No response

Validations

@Avaray Avaray added the enhancement New feature or request label Jun 27, 2022
@Zehir
Copy link
Contributor

Zehir commented Jul 8, 2022

Or maybe just a url that is a Ref<string> instead of a string.
Is there an usage of updating the options ? Most of them are at initialisation

@Avaray
Copy link
Author

Avaray commented Jul 8, 2022

Or maybe just a url that is a Ref<string> instead of a string. Is there an usage of updating the options ? Most of them are at initialisation

I think your idea is also good.
Both are good in my opinion.

@lumdzeehol
Copy link
Contributor

Or maybe just a url that is a Ref<string> instead of a string. Is there an usage of updating the options ? Most of them are at initialisation

After websocket url changed, incidental effects might change either. It's likely to happen that heartbeat message being different in the new websocket service. Consequently I think options should be compatible with Ref / Reative either

@Avaray
Copy link
Author

Avaray commented Nov 9, 2022

Yay! We have it!
#2367

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pr welcome
Projects
None yet
Development

No branches or pull requests

4 participants