in reply to is the socket done or not?
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).
|
|---|