I have a socket.io server in my app, listening on port 5759.
At some point in my code I need to shutdown the server SO IT IS NOT LISTENING ANYMORE.
How Can I accomplish this?
Socket.io is not listening on an http server.
I have a socket.io server in my app, listening on port 5759.
At some point in my code I need to shutdown the server SO IT IS NOT LISTENING ANYMORE.
How Can I accomplish this?
Socket.io is not listening on an http server.
This api has changed again in socket.io v1.1.x it is now:
The API has changed. To stop receiving incoming connections you should run:
You have a server :
To stop recieving incoming connections
NOTE: This will not close existing connections, which will wait for timeout before they are closed. To close them immediately , first make a list of connected sockets
Then close all existing connections
Logic picked up from here : How do I shutdown a Node.js http(s) server immediately?