>> 1) is there a way to close just one direction of the connection? > > No. SOCK_STREAM sockets are always bidirectional.
socket.shutdown(socket.SHUT_WR) does the trick. I think the asyncio.StreamWriter.write_eof() is the high-level equivalent. Marko -- https://mail.python.org/mailman/listinfo/python-list