How can I tell if the TCP peer on the other end has closed the socket?
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.
How can I tell if the TCP peer on the other end has closed the socket?
recv() will return 0 when the socket has been closed by peer.