How to exit a blocking recv() call? [duplicate]

You can shutdown() the socket for input. The recv() will unblock and return zero and everybody will be happy.

Leave a Comment