Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
As I understand it, the above code will connect to a socket and print out the contents of the what the sender is sending.use IO::Socket; my $socket = new IO::Socket::INET ( LocalHost => 'host', LocalPort => 'portnumber', Proto => 'tcp', Listen => 1, ); die "No socket" unless $socket; my $connect= $sock->accept(); while($connect) { print $_; } close($socket);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Sockets
by Zaxo (Archbishop) on Oct 28, 2002 at 01:05 UTC | |
by grep (Monsignor) on Oct 28, 2002 at 02:57 UTC | |
|
Re: Using Sockets
by fokat (Deacon) on Oct 28, 2002 at 05:57 UTC |