An asyncio example

Marko Rauhamaa marko at
Fri Jul 3 17:14:21 CEST 2015

>> 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


More information about the Python-list mailing list