C:\test>perl 831580.pl 1234
enter port: 1234
socket OK
bind OK
listen OK
Server started at 192.168.1.31:1234
Server ready. Waiting for connections...
got a connection from: 192.168.1.31:52479 IO::Socket::INET=GLOB(0x4d7c110)
list
connect to this server:
client: 192.168.1.31:52479 4
192.168.1.31:52479 fred
192.168.1.31:52479 bill
192.168.1.31:52479 test
192.168.1.31:52479 more
192.168.1.31:52479 still more
from 192.168.1.31:52479:
from 192.168.1.31:52479:
from 192.168.1.31:52479:
from 192.168.1.31:52479:
from 192.168.1.31:52479:
from 192.168.1.31:52479: hfrom 192.168.1.31:52479: efrom 192.168.1.31:52479: lfrom 192.168.1.31:52479: lfrom 192.168.1.31:52479: ofrom 192.168.1.31:52479:
####
while( my $tmp = ) { ##sysread(STDIN, $tmp, BUFSIZE) ) {
####
open $client, "+<$fileno" || die "$!";
syswrite( $client, $msg_t ) || die ": $!";