diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2018-01-27 19:22:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-27 19:22:47 (GMT) |
commit | 7c684073f951dd891021676ecfd86ffc18b8895e (patch) | |
tree | b19f8254e8c3f3ac516b922eda7b985edbfebf70 /Lib/asyncio/constants.py | |
parent | f13f12d8daa587b5fcc66fe3ed1090a5dadab289 (diff) | |
download | cpython-7c684073f951dd891021676ecfd86ffc18b8895e.zip cpython-7c684073f951dd891021676ecfd86ffc18b8895e.tar.gz cpython-7c684073f951dd891021676ecfd86ffc18b8895e.tar.bz2 |
bpo-32622: Implement loop.sendfile() (#5271)
Diffstat (limited to 'Lib/asyncio/constants.py')
-rw-r--r-- | Lib/asyncio/constants.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/asyncio/constants.py b/Lib/asyncio/constants.py index 0ad974f..739b0a7 100644 --- a/Lib/asyncio/constants.py +++ b/Lib/asyncio/constants.py @@ -1,3 +1,5 @@ +import enum + # After the connection is lost, log warnings after this many write()s. LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5 @@ -11,3 +13,10 @@ DEBUG_STACK_DEPTH = 10 # Number of seconds to wait for SSL handshake to complete SSL_HANDSHAKE_TIMEOUT = 10.0 + +# The enum should be here to break circular dependencies between +# base_events and sslproto +class _SendfileMode(enum.Enum): + UNSUPPORTED = enum.auto() + TRY_NATIVE = enum.auto() + FALLBACK = enum.auto() |