after the connection is lost log warnings after this many writes seconds to wait before retrying accept number of stack entries to capture in debug mode the larger the number the slower the operation in debug mode see extractstack in formathelpers py number of seconds to wait for ssl handshake to complete the default timeout matches that of nginx number of seconds to wait for ssl shutdown to complete the default timeout mimics lingeringtime used in sendfile fallback code we use fallback for platforms that don t support sendfile or for tls connections default timeout for joining the threads in the threadpool the enum should be here to break circular dependencies between baseevents and sslproto after the connection is lost log warnings after this many write s seconds to wait before retrying accept number of stack entries to capture in debug mode the larger the number the slower the operation in debug mode see extract_stack in format_helpers py number of seconds to wait for ssl handshake to complete the default timeout matches that of nginx number of seconds to wait for ssl shutdown to complete the default timeout mimics lingering_time used in sendfile fallback code we use fallback for platforms that don t support sendfile or for tls connections kib kib default timeout for joining the threads in the threadpool the enum should be here to break circular dependencies between base_events and sslproto
import enum


LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5


ACCEPT_RETRY_DELAY = 1




DEBUG_STACK_DEPTH = 10



SSL_HANDSHAKE_TIMEOUT = 60.0



SSL_SHUTDOWN_TIMEOUT = 30.0



SENDFILE_FALLBACK_READBUFFER_SIZE = 1024 * 256

FLOW_CONTROL_HIGH_WATER_SSL_READ = 256  
FLOW_CONTROL_HIGH_WATER_SSL_WRITE = 512  


THREAD_JOIN_TIMEOUT = 300



class _SendfileMode(enum.Enum):
    UNSUPPORTED = enum.auto()
    TRY_NATIVE = enum.auto()
    FALLBACK = enum.auto()