in reply to Re: how to set socket recv timeout in architecture independent manner?
in thread how to set socket recv timeout in architecture independent manner?
Great, your suggestion to use the '!' modifier in pack() made my code work for 32 and 64-bit platforms. However, the '!' must come AFTER the 'L', giving:
setsockopt( $client, SOL_SOCKET, SO_RCVTIMEO, pack('L!L!', +10, 0) );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: how to set socket recv timeout in architecture independent manner?
by gmoque (Acolyte) on Sep 06, 2009 at 17:04 UTC | |
by BrowserUk (Patriarch) on Sep 06, 2009 at 17:57 UTC | |
by gmoque (Acolyte) on Sep 07, 2009 at 18:43 UTC | |
by BrowserUk (Patriarch) on Sep 07, 2009 at 19:51 UTC |
In Section
Seekers of Perl Wisdom