sammy89 has asked for the wisdom of the Perl Monks concerning the following question:
... $look = IO::Socket::INET->new( PeerAddr => $_, Proto => 'tcp', Timeo +ut => 5 ) or die @$;<br> <br> $sock4 = pack( "CCS", 4, 1, 80 );<br> <br> print $look $sock4;<br> <br> read( $look, $recv, 10 );<br> <br> ( $empty, $granted, $junk ) = unpack( "C C C6", $recv );<b +r> <br> if( $granted == 0x5A )<br> {<br> print " Yes\n";<br> }<br> else<br> {<br> print " No\n";<br> }<br> ...<br>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Socket Connection Check
by tilly (Archbishop) on Jan 26, 2011 at 07:04 UTC | |
|
Re: Perl Socket Connection Check
by Khen1950fx (Canon) on Jan 26, 2011 at 07:55 UTC |