in reply to Why won't this socket client terminate?

Your while loop will not terminate until the server either closes the connection or uses shutdown upon it.

Until the server takes one of these two actions, the client will block on the readline waiting for another transmission. If no transmission is forthcoming and the server fails to terminate the connection, the client will block forever.

On the basis of what you've posted, the problem would appear to lie at the server end of the connection.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re: Why won't this socket client terminate?