diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-02-01 11:30:03 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-01 11:30:03 -0800 |
| commit | e5e1441d41907f92cc3bb5de675a2c519068173d (patch) | |
| tree | 2fbded2f615c97c7ca8c99470d34cddfa4deec6f /Lib/asyncio/sslproto.py | |
| parent | 519eb6ad74f946a9aa7676e2d6579a3a765a8b50 (diff) | |
| download | cpython-git-e5e1441d41907f92cc3bb5de675a2c519068173d.tar.gz | |
bpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol transports (GH-30958)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 64568acbd88a88d54ac9b8215447f88280448dd5)
Co-authored-by: Emiya <importz750@gmail.com>
Diffstat (limited to 'Lib/asyncio/sslproto.py')
| -rw-r--r-- | Lib/asyncio/sslproto.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index cad25b2653..00fc16c014 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -367,6 +367,12 @@ class _SSLProtocolTransport(transports._FlowControlMixin, """Return the current size of the write buffer.""" return self._ssl_protocol._transport.get_write_buffer_size() + def get_write_buffer_limits(self): + """Get the high and low watermarks for write flow control. + Return a tuple (low, high) where low and high are + positive number of bytes.""" + return self._ssl_protocol._transport.get_write_buffer_limits() + @property def _protocol_paused(self): # Required for sendfile fallback pause_writing/resume_writing logic |
