Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: is the socket done or not?

by repson (Chaplain)
on Dec 05, 2000 at 06:47 UTC ( [id://44910]=note: print w/replies, xml ) Need Help??


in reply to is the socket done or not?

>> The spec on the project is that the server close and regenerate the socket after each client is finished sending data, but it never happens. The client sends, and the server just sits.

The problem is that the in the while(<$client>) loop the server keeps on processing until EOF is recived from the client.
However from your definition the client sends data, and then waits for the connection to be closed (which won't happen until it sends EOF).
If the client were to close the connection after sending the server would stop trying to read from the client. Otherwise you need to send a specific prearranged EOF marker (specific character or string that won't occur in the data part of the transmission).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-19 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found