diff options
| author | Mike Teachman <mike.teachman@gmail.com> | 2021-06-03 09:43:56 -0700 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-06-15 13:13:35 +1000 |
| commit | b0b8ebc4f6e337e18c79367ccc5f379dfa8681d9 (patch) | |
| tree | a38455b2c272cad252490335e2151081eea9878f /docs | |
| parent | 95048129b1d93854c25f501c02801929aeeb23f0 (diff) | |
extmod/uasyncio: Add readinto() method to Stream class.
With docs and a multi-test using TCP server/client.
This method is a MicroPython extension, although there is discussion of
adding it to CPython: https://bugs.python.org/issue41305
Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/library/uasyncio.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/library/uasyncio.rst b/docs/library/uasyncio.rst index 1efee56e9..0be328829 100644 --- a/docs/library/uasyncio.rst +++ b/docs/library/uasyncio.rst @@ -240,6 +240,14 @@ TCP stream connections This is a coroutine. +.. method:: Stream.readinto(buf) + + Read up to n bytes into *buf* with n being equal to the length of *buf*. + + Return the number of bytes read into *buf*. + + This is a coroutine, and a MicroPython extension. + .. method:: Stream.readline() Read a line and return it. |
