Of course. I tried to use same code as in your example. such code don't work for me. As I understand if I open socket to accept connections (not to create to a remote host) then it doesn't have state "connected" at all. Not sure if my suggestion is right, I'm beginner in Perl (and in programming). I checked my suggestion with this example: http://www.perlmonks.org/?node_id=884065 Script's logic is to accept a connection and start to send a data, if connection was closed, then stop to publish a data and wait for a new connection
In reply to Re^4: IO::Socket reconnect
by nikita.af
in thread IO::Socket reconnect
by nikita.af
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |