in reply to Re: An IO::Sockets 'test for live connection' question:
in thread An IO::Sockets 'test for live connection' question:

In some quick tests on my system, a syswrite or send of 0 bytes doesn't seem to send any data across the network, which means it won't detect a host that has disappeared (though it will detect a connection that the OS already knows is dead).

Have you tried this and did it work? It would be extremely useful to have some way to probe a connection in this way, and the protocol supports it, but unfortunately the OS doesn't seem to provide a way to access this functionality.

Thanks!

  • Comment on Re^2: An IO::Sockets 'test for live connection' question:

Replies are listed 'Best First'.
Re^3: An IO::Sockets 'test for live connection' question:
by djp (Hermit) on Mar 06, 2007 at 01:20 UTC
    I used this technique years ago in a C/Unix environment, haven't tried it with Perl. YMMV.