Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Answer: Checking if remote exists before calling send

( #204112=categorized answer: print w/ replies, xml ) Need Help??

Q&A > network programming > Checking if remote exists before calling send contributed by rasta

I can advice you two solutions:

1. Use SO_KEEPALIVE socket option like in the following example:
use IO::Socket; my $sock = IO::Socket::INET->new('some_server'); $sock->read(1024,$data) until $sock->atmark;
2. You may use NetPacket::ICMP to check if remote host is alive.

Comment on Answer: Checking if remote exists before calling send
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2014-11-21 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (114 votes), past polls