bpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)

* bpo-31819: Add AbstractEventLoop.sock_recv_into()

* Add NEWS

* Add doc
This commit is contained in:
Antoine Pitrou 2017-10-19 21:46:40 +02:00 committed by Yury Selivanov
parent ea2ef5d0ca
commit 525f40d231
9 changed files with 266 additions and 58 deletions

View file

@ -554,6 +554,21 @@ Low-level socket operations
This method is a :ref:`coroutine <coroutine>`.
.. coroutinemethod:: AbstractEventLoop.sock_recv_into(sock, buf)
Receive data from the socket. Modeled after blocking
:meth:`socket.socket.recv_into` method.
The received data is written into *buf* (a writable buffer).
The return value is the number of bytes written.
With :class:`SelectorEventLoop` event loop, the socket *sock* must be
non-blocking.
This method is a :ref:`coroutine <coroutine>`.
.. versionadded:: 3.7
.. coroutinemethod:: AbstractEventLoop.sock_sendall(sock, data)
Send data to the socket. Modeled after blocking