|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re^2: how to set socket recv timeout in architecture independent manner?by robnewton (Initiate) |
| on Jun 15, 2009 at 23:03 UTC ( [id://771822]=note: print w/replies, xml ) | Need Help?? |
|
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) );
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||