in reply to Re^3: communication between server/client
in thread communication between server/client
Client Code
use IO::Socket::INET; use IO::Handle; my($status,$md_self,@md_others); $|=1; $status=0; $md=0; @md_others=("0"); $md_others=join(' ',@md_others); $| = 1; my ($socket,$client_socket); print "TCP Connection Success.\n"; # creating object interface of IO::Socket::INET modules which inte +rnally creates # socket, binds and connects to the TCP server running on the spec +ific port. $socket = new IO::Socket::INET (PeerHost => '127.0.0.1', PeerPort => '5000', Proto => 'tcp', ) or die "ERROR in Socket Creation + : $!\n"; # write on the socket to server. $_=join(' ',$status,$md,$md_others); print $socket $_; $data=<$socket>; print $data; $socket->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: communication between server/client
by BrowserUk (Patriarch) on Aug 03, 2010 at 18:33 UTC |