in reply to Setting timeout threshold when connecting to a socket.

IIRC, SO_SNDTIMEO and SO_RCVTIMEO do not apply to the connect.

If you do not want to use IO::Socket then your best bet is to do what it does. First place the socket into non-blocking mode, then call connect, then use select(). The socket will become readable when connected.

  • Comment on Re: Setting timeout threhold when connecting to a socket.