This post is part of the Devember collection, useful for the study of the Socket API.

Devember: Half-closing the socket

In the wake of the previous post, another way to improve the robustness of the client code is by shutting down the write half of the connection once all reading operations from standard input end. This is performed by calling the shutdown function: