In the script below when I send a "START" msg to the socket it is
successfully received. When I send a "STOP" msg it is not. What am I
doing wrong here?
James
use strict;
use IO::Socket;
my $client;
my $server_port = "5010";
my $server = IO::Socket::INET->new(LocalPort => $server_port,
Type => SOCK_STREAM,
Reuse => 1,
Listen => 5 )
or die "Couldn't be a tcp server on port $server_port : $@\n$!\n";
while ( $client = $server->accept() ) {
if ( <$client> =~ /START/ ){
msgBox("Starting client...");
logEvent("Starting client...");
} elsif ( <$client> =~ /STOP/ ) {
msgBox("Stopping client...");
logEvent("Stopping client...");
}
}
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users