File tree 3 files changed +13
-0
lines changed
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,12 @@ def get_write_buffer_size(self):
367
367
"""Return the current size of the write buffer."""
368
368
return self ._ssl_protocol ._transport .get_write_buffer_size ()
369
369
370
+ def get_write_buffer_limits (self ):
371
+ """Get the high and low watermarks for write flow control.
372
+ Return a tuple (low, high) where low and high are
373
+ positive number of bytes."""
374
+ return self ._ssl_protocol ._transport .get_write_buffer_limits ()
375
+
370
376
@property
371
377
def _protocol_paused (self ):
372
378
# Required for sendfile fallback pause_writing/resume_writing logic
Original file line number Diff line number Diff line change @@ -99,6 +99,12 @@ def get_write_buffer_size(self):
99
99
"""Return the current size of the write buffer."""
100
100
raise NotImplementedError
101
101
102
+ def get_write_buffer_limits (self ):
103
+ """Get the high and low watermarks for write flow control.
104
+ Return a tuple (low, high) where low and high are
105
+ positive number of bytes."""
106
+ raise NotImplementedError
107
+
102
108
def write (self , data ):
103
109
"""Write some data bytes to the transport.
104
110
Original file line number Diff line number Diff line change
1
+ Add the ``get_write_buffer_limits `` method to :class: `asyncio.transports.WriteTransport ` and to the SSL transport.
You can’t perform that action at this time.
0 commit comments