server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind(('0.0.0.0', 8080)) server.listen(5) Async client connection async def connect(): reader, writer = await asyncio.open_connection('localhost', 8080) return reader, writer HTTP clients HTTP client modules in Python make ...
The tricky thing here is that I think we'd have to basically rewrite the IOManager classes, because you can't necessarily manipulate an epoll/kqueue/select from one thread while it's running, so whenever a new task calls wait_socket_writable or whatever we'd have to poke the I/O thread...