diff options
author | Olle Lundberg <geek@nerd.sh> | 2014-08-14 14:28:34 +0200 |
---|---|---|
committer | Olle Lundberg <geek@nerd.sh> | 2014-08-14 15:19:06 +0200 |
commit | 83aa7335f7121f9259a41ae27cab5fb8dad09b96 (patch) | |
tree | 10ac3da15d5ac002277c80817082d6bee2b717a5 /paramiko/common.py | |
parent | c0df755ead0eb54d798dd3f49b7dd86b8ad6baeb (diff) | |
download | paramiko-83aa7335f7121f9259a41ae27cab5fb8dad09b96.tar.gz |
Move window and packet constants.
Centralise them to the common module to avoid import cycles.
Also add constants for default values and use them in the
transport class.
Diffstat (limited to 'paramiko/common.py')
-rw-r--r-- | paramiko/common.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/paramiko/common.py b/paramiko/common.py index 18298922..93f71df0 100644 --- a/paramiko/common.py +++ b/paramiko/common.py @@ -171,3 +171,14 @@ CRITICAL = logging.CRITICAL # Common IO/select/etc sleep period, in seconds io_sleep = 0.01 + +DEFAULT_WINDOW_SIZE = 64 * 2 ** 15 +DEFAULT_MAX_PACKET_SIZE = 2 ** 15 + +# lower bound on the max packet size we'll accept from the remote host +# Minimum packet size is 32768 bytes according to +# http://www.ietf.org/rfc/rfc4254.txt +MIN_PACKET_SIZE = 2 ** 15 + +# Max windows size according to http://www.ietf.org/rfc/rfc4254.txt +MAX_WINDOW_SIZE = 2**32 -1 |