This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sensing peer socket closed

How can I tell if the TCP peer on the other end has closed the socket?