Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^6: Timeout for an established connection

by 0day (Sexton)
on Jan 02, 2013 at 20:50 UTC ( [id://1011342]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Timeout for an established connection
in thread Timeout for an established connection

Some more code:
socket (my $sock, PF_INET, SOCK_STREAM, getprotobyname('tcp')) || die +"socket: $!"; if(fcntl ($sock, F_SETFL, O_NONBLOCK)){ my $iaddr = inet_aton(${$sock}->{host}) or return; my $paddr = sockaddr_in( ${$sock}->{port}, $iaddr ) or return; setsockopt($sock, SOL_SOCKET, SO_SNDTIMEO, pack("QQ", ${$sock}->{t +imeout}, 0)) or die "setsockopt SOL_SOCKET, SO_SNDTIMEO: $!\n"; setsockopt($sock, SOL_SOCKET, SO_RCVTIMEO, pack("QQ", ${$sock}->{t +imeout}, 0)) or die "setsockopt SOL_SOCKET, SO_RCVTIMEO: $!\n"; setsockopt($sock, 6, 18, pack("QQ", 5, 0)) or die "setsockopt SOL_ +TCP, TCP USER TIMEOUT: $!\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1011342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-19 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found