Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: TCP Server using fork to accept multiple requests

by Corion (Patriarch)
on Aug 17, 2022 at 07:59 UTC ( [id://11146184]=note: print w/replies, xml ) Need Help??


in reply to TCP Server using fork to accept multiple requests

You likely want to add an inner loop to keep on reading:

... if ($pid == 0) { # This is the fork child while( $new_sock->connected ) { $new_sock->recv(my $data, 500); print "$data\n"; } }

Replies are listed 'Best First'.
Re^2: TCP Server using fork to accept multiple requests
by Lucas Rey (Sexton) on Aug 17, 2022 at 09:41 UTC
    Thank you Corion, this is working perfect!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11146184]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found