client can emit disconnect without a preceding connect
See original GitHub issueIt should not be possible to emit 'disconnect'
without 'connect'
. However, it then becomes a problem of how to make connection errors visible… do we need another event? i.e. what do we do with socket errors that occur before 'connect'
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
force client disconnect from server with socket.io and nodejs
socket.disconnect() can be used only on the client side, not on the server side. Client.emit('disconnect') triggers the disconnection event on the server, ...
Read more >why socket.disconnect() on client side doesn't fire ... - GitHub
here's my code: client-side var socket = io.connect('http://' + serverAddress ,{ reconnection: false, forceNew: true } ) ...
Read more >The Socket instance (client-side)
Besides emitting and listening to events, the Socket instance has a few attributes that may be of use in your application:
Read more >Getting Started — Flask-SocketIO documentation
SocketIO event handlers defined as shown in the previous section can send reply messages to the connected client using the send() and emit()...
Read more >How to manage users in socket.io in Node.js ? - GeeksforGeeks
removeUser : This function will be called whenever a connection is destroyed or a user leaves and the user name is deleted from...
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
The big problem that I see with the
error
event is the potential uncaught exception (or maybe that’s what you meant and I didn’t get it)+1