I connect to socket server in NodeJs using this command:
client = net.createConnection()
How can I then properly disconnect from the server?
client.end() and even
but when I check the connection status using netstat it shows that the connection is in state FIN_WAIT2.
How can I close and destroy the connection altogether?
net.createConnection() returns a Socket object.
client.destroy() is what you want to do.