in reply to communication between server/client
When you attempt to read data in your server, you are attempting to read a 'line':
while(defined(my $data=<$client_socket>))
But when your client writes the data, it doesn't add any delimiter:
print $socket $data[$_];
You need to read the docs and understand how Perl's basic IO functions work.
And whilst we're at it, what on earth is your reasoning for first joining a bunch of variables together with spaces, and then spliting them apart again?
# write on the socket to server. $_=join(' ',$status,$md,$md_others); @data=split(" ",$_);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: communication between server/client
by hari9 (Sexton) on Aug 03, 2010 at 17:37 UTC | |
by BrowserUk (Patriarch) on Aug 03, 2010 at 17:49 UTC | |
by hari9 (Sexton) on Aug 03, 2010 at 18:05 UTC | |
by BrowserUk (Patriarch) on Aug 03, 2010 at 18:33 UTC |