Hello! Here is my perl script. I tried to communicate
on the same port, but it wasn't worked. I can send message
to a server, but I cannot get any response. The response is
sent out from the server in the 30000 port - I tested the
server with a C++ client and the same scenario worked fine.
my $sock = new IO::Socket::INET (
PeerAddr => '127.0.0.1',
PeerPort => '30000',
Proto => 'tcp',
die "Could not create socket: $!\n" unless $sock;
print $sock "Hello there!\n";
my $new_sock = $sock->accept();
print "Stopped! \n";
Maybe this line is wrong: my $new_sock = $sock->accept(); What other lib should I use? How could I fix it?
Edit by tye, remove PRE tag, preserve formatting