tenny1204 has asked for the wisdom of the Perl Monks concerning the following question:
I wrote some socket-communication programs and now I want to rewrite them using the built-in functions iso the IO::Socket library.But i can't figure out how to set a timeout like you can do in the constructor when using IO::Socket.What i tried was adding these 2 lines of code for setting a 1 second timeout.
setsockopt(SOCKET,SOL_SOCKET,SO_SNDTIMEO,pack("LL",1,0)); setsockopt(SOCKET,SOL_SOCKET,SO_RCVTIMEO,pack("LL",1,0));
They don't work and i can't find out what does. Maybe someone can help me, Thank you in advance
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: built-in socket functions
by Anonymous Monk on Oct 25, 2012 at 02:33 UTC | |
by tenny1204 (Novice) on Oct 25, 2012 at 04:28 UTC | |
by BrowserUk (Patriarch) on Oct 25, 2012 at 04:45 UTC | |
by tenny1204 (Novice) on Oct 25, 2012 at 05:43 UTC | |
Re: built-in socket functions
by zentara (Archbishop) on Oct 25, 2012 at 10:42 UTC | |
by Anonymous Monk on Oct 25, 2012 at 10:48 UTC |
Back to
Seekers of Perl Wisdom