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

Reuse Websocket #4

Open
neophenix opened this issue Sep 9, 2018 · 0 comments
Open

Reuse Websocket #4

neophenix opened this issue Sep 9, 2018 · 0 comments

Comments

@neophenix
Copy link
Owner

Just realized that I'm not reusing the websocket, and relying on the onclose event to clean up, also on the onopen to send messages.

This should just be opened once on a page, and then reused. And instead of using onopen to send the message probably pass whatever connect function is made a callback that will send the message onopen or if we are already open, or queue it if we are connecting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant