MCPcopy Index your code
hub / github.com/python/cpython / set_read_buffer_limits

Method set_read_buffer_limits

Lib/asyncio/sslproto.py:176–196  ·  view source on GitHub ↗

Set the high- and low-water limits for read flow control. These two values control when to call the upstream transport's pause_reading() and resume_reading() methods. If specified, the low-water limit must be less than or equal to the high-water limit. Neither valu

(self, high=None, low=None)

Source from the content-addressed store, hash-verified

174 return self._ssl_protocol._get_write_buffer_size()
175
176 def set_read_buffer_limits(self, high=None, low=None):
177 """Set the high- and low-water limits for read flow control.
178
179 These two values control when to call the upstream transport's
180 pause_reading() and resume_reading() methods. If specified,
181 the low-water limit must be less than or equal to the
182 high-water limit. Neither value can be negative.
183
184 The defaults are implementation-specific. If only the
185 high-water limit is given, the low-water limit defaults to an
186 implementation-specific value less than or equal to the
187 high-water limit. Setting high to zero forces low to zero as
188 well, and causes pause_reading() to be called whenever the
189 buffer becomes non-empty. Setting low to zero causes
190 resume_reading() to be called only once the buffer is empty.
191 Use of zero for either limit is generally sub-optimal as it
192 reduces opportunities for doing I/O and computation
193 concurrently.
194 """
195 self._ssl_protocol._set_read_buffer_limits(high, low)
196 self._ssl_protocol._control_ssl_reading()
197
198 def get_read_buffer_limits(self):
199 return (self._ssl_protocol._incoming_low_water,

Callers

nothing calls this directly

Calls 2

_control_ssl_readingMethod · 0.80

Tested by

no test coverage detected