in reply to Re^4: Check connection state prior to send data
in thread Check connection state prior to send data
If the socket is not connected, writing to it will return an error which you can then check. Usually, writing to a socket has a timeout which you cannot avoid due to the nature of TCP.
Personally, I would look at AnyEvent or one of the other frameworks to handle non-blocking sockets.
Maybe you can tell us what solutions you have looked at and where you have problems with them? If you want to roll your own solution, perlipc provides a good starting point IMO.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Check connection state prior to send data
by Lucas Rey (Sexton) on Sep 24, 2016 at 09:16 UTC | |
by Corion (Patriarch) on Sep 24, 2016 at 09:26 UTC |