Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Answer: Checking if remote exists before calling send

by rasta (Hermit)
on Oct 10, 2002 at 07:24 UTC ( #204112=categorized answer: print w/replies, xml ) Need Help??

Q&A > network programming > Checking if remote exists before calling send - Answer 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.

Log In?

What's my password?
Create A New User
and the monks are mute...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-02-26 20:05 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (376 votes). Check out past polls.