dwatson06 has asked for the wisdom of the Perl Monks concerning the following question:
use IO::Socket; $local = IO::Socket::INET->new( Proto => 'tcp', LocalAddr => '192.168.150.131:80', Reuse => 1 ) or die "$!"; $local->listen(); print "Awaiting client...\n"; my $addr; while ($addr = $local->accept() ) { print "Connecting from: ", $addr->peerhost(); print " Port: ", $addr->peerport(), "\n"; while (<$addr>) { print "Client: $_"; } close $addr; # close client print "Idle...\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems accepting client data
by Zaxo (Archbishop) on Apr 21, 2004 at 20:22 UTC | |
|
Re: Problems accepting client data
by Fletch (Bishop) on Apr 21, 2004 at 20:50 UTC | |
|
Re: Problems accepting client data
by NetWallah (Canon) on Apr 21, 2004 at 20:32 UTC | |
by dwatson06 (Friar) on Apr 21, 2004 at 21:50 UTC |