I have a network client connection with a socket (using net.createConnection (port, host). This works great.
However, sometimes there is a chance that the server will delete the connection, and I would like the network connection to automatically turn on when the server is up and running
I can capture the on ('end') event to catch the initial disconnect and try to reconnect.
However, how can I check if the client is connected because I want to repeat every n milliseconds in the deferral strategy
source
share