mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)
* bpo-31819: Add AbstractEventLoop.sock_recv_into() * Add NEWS * Add doc
This commit is contained in:
parent
ea2ef5d0ca
commit
525f40d231
9 changed files with 266 additions and 58 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue