The asyncio event loop provides coroutine based versions of socket.recv, and others. Some
socket.socket APIs like
recvmsg are missing. This enhancement would be to add
loop.sock_sendmsg- async analogue of
loop.sock_recvmsg- async analogue of
loop.sock_send_fds- async analogue of
loop.sock_recv_fds- async analogue of
- more, depending on desire for more complete compatibility with the
Some socket APIs like
send_fds provide different features that
socket.send do not, for example sending ancillary data or sharing file descriptors between processes.
From my understanding, we could implement these proposed
loop.sock_[sendmsg/recvmsg/etc] with a similar approach to how asyncio’s
sock_send works. Once we’re happy with the set of APIs, I’d be happy to start implementation of this work.