in reply to Re^7: IO::Socket Listen
in thread IO::Socket Listen
Eliya , your code provide some improvements in the performance it dont take 5 minutes anymore it takes between 30sec and 2minutes , is there anyway to make this faster? Thanks!
Here is my code now
my $socket = new IO::Socket::INET ( PeerAddr => '192.168.11.244', PeerPort => '6008', Proto => 'tcp', ); die "Couldn't connect: $!\n" unless $socket; $data = pack("CccccccCcCC",02,65,63,80,81,76,86,03,100,13,10); if ( $socket ) { print $socket $data ; my $len = 131; my $resp = ''; while ( sysread $socket, $_, $len ) { $resp .= $_; last if length($resp) == $len; } print "$resp\n"; } close($socket);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: IO::Socket Listen
by Marshall (Canon) on Dec 08, 2011 at 06:55 UTC | |
by Eliya (Vicar) on Dec 08, 2011 at 08:53 UTC | |
by Marshall (Canon) on Dec 08, 2011 at 12:08 UTC | |
by Secalles (Initiate) on Dec 09, 2011 at 12:54 UTC | |
by Secalles (Initiate) on Dec 09, 2011 at 14:22 UTC | |
|