How to properly close socket in both client and server (python)
It looks like what you are looking for is an graceful shutdown. First your code does not work because you are closing socket immediately after calling shutdown. The rule is that in a graceful shutdown, both sides must be aware of the shutting down and have acknowledged it before any actually closes the socket. I … Read more