|
Hello guys,
So I'm trying to connect to remote host via SOCKS5 proxy using IO::Socket:Socks module. How I can check the proxy is dead or remote host is dead when I get undef after constructor calling? The same about Net::SOCKS module. Thanks guys!!!
use IO::Socket::Socks;
my $sock = new IO::Socket::Socks(ProxyAddr=>"XXX.XXX.XXX.XXX",
ProxyPort=>"PXXX",
ConnectAddr=>"YYY.YYY.YYY.YYY",
ConnectPort=>PYYY,
AuthType=>"none",
SocksDebug=>1
);
if(!defined $sock) {
# How I can check who is dead XXX.XXX.XXX.XXX:PXXX or YYY.YYY.YYY.YYY:PYYY?
#
}
|