![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Setting timeout threshold when connecting to a socket.by ehdonhon (Curate) |
on Dec 14, 2001 at 00:09 UTC ( [id://131739]=perlquestion: print w/replies, xml ) | Need Help?? |
ehdonhon has asked for the wisdom of the Perl Monks concerning the following question: Hello, I have a bit of legacy code that I want to avoid changing as much as possible:
The issue is that I want to modify the amount of time that I am spending waiting for the connect before I timeout. I think that I can use setsockopt to do this. Reading the unix setsockopt (2) manpage (Using FreeBSD 4.1.1-STABLE), it appears that there are two variables associated with timeouts: SO_SNDTIMEO set timeout value for output SO_RCVTIMEO set timeout value for input My Questions:
Note: Yes, I know, I could do all this so much easier with IO::Socket, but let's just assume that is not an option here. Thanks!
Back to
Seekers of Perl Wisdom
|
|