"The ultimate SO_LINGER page" - an old article about weird problems when you close TCP connections
"The ultimate SO_LINGER page" - an old article about weird problems when you close TCP connections
blog.netherlabs.nl /articles/2009/01/18/the-ultimate-so_linger-page-or-why-is-my-tcp-not-reliable
Doing socket things with C++ this article helped me a few times