mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-32622: Implement loop.sendfile() (#5271)
This commit is contained in:
parent
f13f12d8da
commit
7c684073f9
12 changed files with 560 additions and 8 deletions
|
@ -282,6 +282,8 @@ class _SSLPipe(object):
|
|||
class _SSLProtocolTransport(transports._FlowControlMixin,
|
||||
transports.Transport):
|
||||
|
||||
_sendfile_compatible = constants._SendfileMode.FALLBACK
|
||||
|
||||
def __init__(self, loop, ssl_protocol):
|
||||
self._loop = loop
|
||||
# SSLProtocol instance
|
||||
|
@ -365,6 +367,11 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
|
|||
"""Return the current size of the write buffer."""
|
||||
return self._ssl_protocol._transport.get_write_buffer_size()
|
||||
|
||||
@property
|
||||
def _protocol_paused(self):
|
||||
# Required for sendfile fallback pause_writing/resume_writing logic
|
||||
return self._ssl_protocol._transport._protocol_paused
|
||||
|
||||
def write(self, data):
|
||||
"""Write some data bytes to the transport.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue