Add pause/resume_writing, discard_output.
This commit is contained in:
parent
8acf02f633
commit
51d8e64d24
10
pep-3156.txt
10
pep-3156.txt
|
@ -1019,6 +1019,16 @@ Bidirectional stream transports have the following public methods:
|
||||||
- ``resume()``. Restart delivery of data to the protocol via
|
- ``resume()``. Restart delivery of data to the protocol via
|
||||||
``data_received()``.
|
``data_received()``.
|
||||||
|
|
||||||
|
- ``pause_writing()``. Suspend sending data to the network until a
|
||||||
|
subsequent ``resume_writing()`` call. Between ``pause_writing()``
|
||||||
|
and ``resume_writing()`` the transport's ``write()`` method will
|
||||||
|
just be accumulating data in an internal buffer.
|
||||||
|
|
||||||
|
- ``resume_writing()``. Restart sending data to the network.
|
||||||
|
|
||||||
|
- ``discard_output()``. Discard all data buffered by ``write()`` but
|
||||||
|
not yet sent to the network.
|
||||||
|
|
||||||
- ``close()``. Sever the connection with the entity at the other end.
|
- ``close()``. Sever the connection with the entity at the other end.
|
||||||
Any data buffered by ``write()`` will (eventually) be transferred
|
Any data buffered by ``write()`` will (eventually) be transferred
|
||||||
before the connection is actually closed. The protocol's
|
before the connection is actually closed. The protocol's
|
||||||
|
|
Loading…
Reference in New Issue