return (0) unless ($sock->connected()); return (0) unless (getpeername($sock));
Perhaps you should go find the source code of the connected() method.
sub connected { @_ == 1 or croak 'usage: $sock->connected()'; my($sock) = @_; getpeername($sock); }
- tye
In reply to Re^5: How can I test TCP socket status in Perl? (voodoo)
by tye
in thread How can I test TCP socket status in Perl?
by beanscake
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |