diff options
author | Guido van Rossum <guido@python.org> | 2014-02-24 22:31:25 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2014-02-24 22:31:25 (GMT) |
commit | 3e97585b3e24b23e0e2cef4d8ccced003e271dfc (patch) | |
tree | 4a125c215a788bd96ad03362b8bcf0d9b36a821c /Doc/library | |
parent | 8920e915fab355f73ee0e73e3e1b3c1b7a6768fd (diff) | |
download | cpython-3e97585b3e24b23e0e2cef4d8ccced003e271dfc.zip cpython-3e97585b3e24b23e0e2cef4d8ccced003e271dfc.tar.gz cpython-3e97585b3e24b23e0e2cef4d8ccced003e271dfc.tar.bz2 |
Clarify that flow control works for datagrams, except on BSD.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/asyncio-protocol.rst | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst index dabe7d8..cbbc151 100644 --- a/Doc/library/asyncio-protocol.rst +++ b/Doc/library/asyncio-protocol.rst @@ -376,8 +376,8 @@ The following callbacks are called on :class:`DatagramProtocol` instances. Flow control callbacks ---------------------- -These callbacks may be called on :class:`Protocol` and -:class:`SubprocessProtocol` instances: +These callbacks may be called on :class:`Protocol`, +:class:`DatagramProtocol` and :class:`SubprocessProtocol` instances: .. method:: BaseProtocol.pause_writing() @@ -402,6 +402,15 @@ buffer size reaches the low-water mark. are important to ensure that things go as expected when either mark is zero. +.. note:: + On BSD systems (OS X, FreeBSD, etc.) flow control is not supported + for :class:`DatagramProtocol`, because send failures caused by + writing too many packets cannot be detected easily. The socket + always appears 'ready' and excess packets are dropped; an + :class:`OSError` with errno set to :const:`errno.ENOBUFS` may or + may not be raised; if it is raised, it will be reported to + :meth:`DatagramProtocol.error_received` but otherwise ignored. + Coroutines and protocols ------------------------ |