Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: TCP Server using fork to accept multiple requests

by tybalt89 (Monsignor)
on Aug 20, 2022 at 16:29 UTC ( [id://11146265]=note: print w/replies, xml ) Need Help??


in reply to Re^2: TCP Server using fork to accept multiple requests
in thread TCP Server using fork to accept multiple requests

The socket is closed when $new_sock goes out of its scope, which is the "if" statement, so the socket IS closed when the outer "while" repeats. All the parent has to do is exit the "if".

  • Comment on Re^3: TCP Server using fork to accept multiple requests

Replies are listed 'Best First'.
Re^4: TCP Server using fork to accept multiple requests
by NERDVANA (Deacon) on Aug 20, 2022 at 23:26 UTC
    Post updated. Sorry for the noise.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-19 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found