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

perldoc -f setsockopt:

setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL
Sets the socket option requested. Returns undefined if there is an error. OPTVAL may be specified as "undef" if you don't want to pass an argument.
Update: use Socket; contains the symbols for the options. That will save autoloating inet_aton() too

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Setting timeout threhold when connecting to a socket.
by ehdonhon (Curate) on Dec 14, 2001 at 00:40 UTC

    Thanks, but I've alread read that (in fact, I even created a link to that in my original message). Either I am missing something really obvious, or the perldoc isn't al that helpful here

    I guess my questions are: what is the correct OPTNAME to control the connection timeout, and how do I do I know what kind of data structure to use in OPTVAL?