Adam Bartoš <dre...@gmail.com>: > Marko Rauhamaa: >> socket.shutdown(socket.SHUT_WR) does the trick. >> >> I think the asyncio.StreamWriter.write_eof() is the high-level >> equivalent. > > You are right that writer.write_eof() behaves like > writer.transport.get_extra_info("socket").shutdown(socket.SHUT_WR) – > the server resumes and sends the response. However, the client still > reads empty bytes afterwards.
Reading empty bytes means the peer has shut down its end of the connection. Marko -- https://mail.python.org/mailman/listinfo/python-list