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

Add useWebSocket() resource #813

Open
cowboyd opened this issue Oct 31, 2023 · 0 comments
Open

Add useWebSocket() resource #813

cowboyd opened this issue Oct 31, 2023 · 0 comments
Assignees
Milestone

Comments

@cowboyd
Copy link
Member

cowboyd commented Oct 31, 2023

WebSocket is a really handy API for realtime communication that's now ubiquitous.

However, it is essentially a full duplex communication channel and so there is some complexity associated with using it correctly. Both sides needs to be managed and handle closing gracefully.

Making sure that communication is delayed until sockets are ready, error handling, etc... all of it needs to happen and coordination is a nightmare. This sketch takes care of all of it without needing to do anything.

https://gist.github.com/cowboyd/c52dd3050cb3d015a41cc9e24dbdca27

@cowboyd cowboyd added this to the v3.1 milestone Oct 31, 2023
@cowboyd cowboyd self-assigned this Oct 31, 2023
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