summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/sslproto.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2018-01-27 19:22:47 (GMT)
committerGitHub <noreply@github.com>2018-01-27 19:22:47 (GMT)
commit7c684073f951dd891021676ecfd86ffc18b8895e (patch)
treeb19f8254e8c3f3ac516b922eda7b985edbfebf70 /Lib/asyncio/sslproto.py
parentf13f12d8daa587b5fcc66fe3ed1090a5dadab289 (diff)
downloadcpython-7c684073f951dd891021676ecfd86ffc18b8895e.zip
cpython-7c684073f951dd891021676ecfd86ffc18b8895e.tar.gz
cpython-7c684073f951dd891021676ecfd86ffc18b8895e.tar.bz2
bpo-32622: Implement loop.sendfile() (#5271)
Diffstat (limited to 'Lib/asyncio/sslproto.py')
-rw-r--r--Lib/asyncio/sslproto.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py
index 1130bce..863b543 100644
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -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.