Monitoring a tcp port in Python Programming Language?

editAnswer

reportReport

Answer(s) available: 1

Murgesh Tak

, Curator, Photoshop Valid Drivers License

"

I'd recommend not leaving your (single) test socket connected - make a new connection each time you need to poll. Every load balancer / server availability system I've ever seen uses this method instead of a persistent connection.

"

If the remote server hasn't responded within a reasonable amount of time (e.g. 10s) mark it as "down". Use timers and signals rather than function response codes to handle that timeout.

"

thumb_upUpvote18

smsComment

reportReport