I am fairly new to NodeRed - I would like to know how to implement the following in NodeRed:
- I am using a TCP Server to receive incoming connections from various devices.
- Since we are operating over a 'lossy network' ( cellular network) , we have implemented an
application layer exchange of periodic 'Health check' messages to ascertain if the device is
'online' or not.
- This is to prevent 'half-open' sockets build-up on the server side.
- If no HC messages are received from the device for a period of 1 min, we close the socket on the server side so that there is no build-up of 'half-open' sockets.
I am trying to implement the above in NodeRed. I am using a TCPserver node for devices to connect to and receive the msg payload. However, how do I reference the socket that a specific device is connected to so that I can close it if I haven't received health check messages for some time period?
Looking forward to some help on how to about doing this in NodeRed.