in reply to Two way socket
Made a small change and now your client received from server.
You have a line:And it should be:$answer = <$soc>;
$answre = <$socket>;
Use 'use strict' next time, and you can spot this problem yourself;-)
Update:
Now I looked at your server side code, and found that, after it communicated with the first client, it quickly sink into a dead loop, and the rest of your code is not reachable (see my comment made in the code):while ($new_sock = $listener->accept()) #now you just stuck in this loop { while (defined ($buf = <$new_sock>)) #where do you reply to your client, start from the second client? + { print FILE "$buf"; } close FILE; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Two way socket
by Anonymous Monk on Oct 16, 2003 at 05:09 UTC | |
by pg (Canon) on Oct 16, 2003 at 05:47 UTC | |
|
Re: Re: Two way socket
by ctilmes (Vicar) on Oct 16, 2003 at 16:11 UTC | |
|
Re: Re: Two way socket
by Anonymous Monk on Oct 16, 2003 at 05:34 UTC |