blob: 739b0a70c13e06469fb2bdae89f2ed49599f39a4 [file] [log] [blame]
Andrew Svetlov7c684072018-01-27 21:22:47 +02001import enum
2
Guido van Rossum3317a132013-11-01 14:12:50 -07003# After the connection is lost, log warnings after this many write()s.
Guido van Rossum27b7c7e2013-10-17 13:40:50 -07004LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5
Guido van Rossum3317a132013-11-01 14:12:50 -07005
6# Seconds to wait before retrying accept().
7ACCEPT_RETRY_DELAY = 1
Antoine Pitrou921e9432017-11-07 17:23:29 +01008
9# Number of stack entries to capture in debug mode.
Barry Warsawc060c7e2017-11-07 09:05:15 -080010# The larger the number, the slower the operation in debug mode
Andrew Svetlovf74ef452017-12-15 07:04:38 +020011# (see extract_stack() in format_helpers.py).
Antoine Pitrou921e9432017-11-07 17:23:29 +010012DEBUG_STACK_DEPTH = 10
Neil Aspinallf7686c12017-12-19 19:45:42 +000013
14# Number of seconds to wait for SSL handshake to complete
15SSL_HANDSHAKE_TIMEOUT = 10.0
Andrew Svetlov7c684072018-01-27 21:22:47 +020016
17# The enum should be here to break circular dependencies between
18# base_events and sslproto
19class _SendfileMode(enum.Enum):
20 UNSUPPORTED = enum.auto()
21 TRY_NATIVE = enum.auto()
22 FALLBACK = enum.auto()