Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/aiofastnet/constants.py: 86%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# After the connection is lost, log warnings after this many write()s.
2LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5
4# Seconds to wait before retrying accept().
5ACCEPT_RETRY_DELAY = 1
7SSL_TIMEOUT_DEFAULTS = {
8 # Number of seconds to wait for SSL handshake to complete
9 # The default timeout matches that of Nginx.
10 "ssl_handshake_timeout": 60.0,
11 # Number of seconds to wait for SSL shutdown to complete
12 # The default timeout mimics lingering_time
13 "ssl_shutdown_timeout": 30.0
14}
16SSL_BIO_SIZE_DEFAULTS = {
17 # Static size for the incoming SSL BIO
18 # This is the size of the buffer that we pass to the recv syscall
19 # The bigger it is the more we can read from kernel RCVBUF with a single syscall
20 # But it also increases the memory footprint per client
21 "ssl_incoming_bio_size": int(16 * (16 * 1024 + 64)),
23 # Static size for the outgoing SSL BIO
24 # Indicates how much encrypted data is accumulated before we call `send` syscall
25 # Having extra 64 bytes prevents scenarios when we send almost complete TLS record.
26 # It is not great for the latency.
27 "ssl_outgoing_bio_size": int(16 * (16 * 1024 + 64))
28}
30DATA_RECEIVED_MAX_SIZE = 256 * 1024
32EXC_INFO_ATTR = '_aiofastnet_extra_info'