Perl: the Markov chain saw | |
PerlMonks |
TCP Server using fork to accept multiple requestsby Lucas Rey (Sexton) |
on Aug 17, 2022 at 07:39 UTC ( [id://11146183]=perlquestion: print w/replies, xml ) | Need Help?? |
Lucas Rey has asked for the wisdom of the Perl Monks concerning the following question:
Dear community, I'm trying to create a little server who handles multiple clients connections (at least 10). Below the current code that works perfect using fork. At least it accepts several connections from clients. With the below code, I have the following behaviour: - Client ask for connection ==> Accepted ==> OK - Client sent packet ==> Received and printed ==> OK - Client sent another packet ==> Not received ==> NOK Most probably, the while cicle will be activated only for each connection request, so that's the reason because I cannot retrieve other packets. Could someone help me please to adjust the below code? What I need is establish one (or more) client connection, then client send data continuosly (without disconnection) and server should reply on each packet it receives. Thank you Lucas
Back to
Seekers of Perl Wisdom
|
|