Listening to 'connection' event with io.on not working
See original GitHub issueTried to work through the first example in “How to use” using version 0.8.7, and found that it worked if I called io.of('').on
but not io.on
. It looks like the ‘connection’ event was emitted from SocketNamespace, but io.on
was adding the listener to Manager.
Issue Analytics
- State:
- Created 12 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
node.js - Socket.io server not listening to connection event
I started my server and its work well But even after the client page loads and is served, connection event is not listened...
Read more >Troubleshooting connection issues | Socket.IO
First and foremost, please note that disconnections are common and expected, even on a stable Internet connection:
Read more >Socket.IO, React and Node.js: Going Real-Time
We can listen for a connection event, fire up a function when a new user connects to the server, emit a message (basically...
Read more >Introduction to Sockets.IO in Node.js - GeeksforGeeks
Restart the project again from the console and try opening the localhost on multiple tabs and browsers. Each of them will act as...
Read more >Socket.IO - Event Handling - Tutorialspoint
log('A user connected'); // Send a message after a timeout of 4seconds setTimeout(function(){ socket.send('Sent a message 4seconds after connection!'); }, ...
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 FreeTop 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
Top GitHub Comments
it worked for me: https://stackoverflow.com/questions/44628363/socket-io-access-control-allow-origin-error
Could anyone help with this ?