in reply to Re^10: Timeout for an established connection
in thread Timeout for an established connection
Maybe this is an error in the syntax? setsockopt($sock, 6, 18, pack("QQ", 5, 0))
That does look suspect to me.
According to this (4th post), the parameter is the address of an int containing the timeout in milliseconds. Given you are on a 64-bit build I'd expect to use something like this in Perl:
setsockopt( $sock, 6, 18, pack( "Q", 5000 ) )
Or possibly:
my $userTimeout = 5000; setsockopt( $sock, 6, 18, \$userTimeout );
|
|---|