Confirmation of a socket connection
See original GitHub issuePicking up from @ToryByte’s tweet: https://twitter.com/ToryByte/status/1267225319947280385
Is there a way to wait for a subscription to connect? I cant find a way to wait for a subscription to be ready before I start running other statements. It would be nice if subscribe()
returned a promise.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Check if socket is connected or not [duplicate] - Stack Overflow
Don't check first and then send. It's wasted effort and won't work anyway -- the status can change between when you check and...
Read more >Sockets Tutorial
Sockets Tutorial. This is a simple tutorial on using sockets for interprocess communication. The client server model. by Robert Ingalls.
Read more >Sample Code Illustrating a Secure Socket Connection ...
These samples illustrate how to set up a secure socket connection between a client and a server.
Read more >Understanding Sockets - DigitalOcean
Stream sockets are connection oriented, which means that packets sent to and received from a network socket are delivered by the host ......
Read more >Socket processing for transactions - IBM
The client application receives the output, sends an ACK, and must issue a READ to receive the next output or the timeout notification....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This does help, this means that I can poll those until they return true.
Consider a use case for say, an ExpressJS app. You would want to launch your Express app but not start accepting requests until all your sockets were connected and ready.
This can be accomplished now depending on which version of
realtime-js
you’re using.If you’re using
realtime-js
master
/v1
then you can do:If you’re using
realtime-js
rc
/v2
then you can do: