diff options
author | Olle Lundberg <geek@nerd.sh> | 2014-08-13 17:09:06 +0200 |
---|---|---|
committer | Olle Lundberg <geek@nerd.sh> | 2014-08-13 17:43:06 +0200 |
commit | 677285a3583b15c2bbd765816d5b62f4cb403965 (patch) | |
tree | 6b468dc868f58a3d9b1199ecde9cbb46c976db55 | |
parent | 80148a3039499fb52d7b5c7a583c14258ccf9cae (diff) |
Rename max_packet_size and window_size.
This is to indicate that they should be seen as defaults and can
be overriden.
-rw-r--r-- | paramiko/transport.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py index bda05443..7776b9d7 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -231,8 +231,8 @@ class Transport (threading.Thread): self.channel_events = {} # (id -> Event) self.channels_seen = {} # (id -> True) self._channel_counter = 1 - self.max_packet_size = 2 ** 15 - self.window_size = 64 * self.max_packet_size + self.default_max_packet_size = 2 ** 15 + self.default_window_size = 64 * self.default_max_packet_size self._forward_agent_handler = None self._x11_handler = None self._tcp_handler = None @@ -610,8 +610,8 @@ class Transport (threading.Thread): m.add_byte(cMSG_CHANNEL_OPEN) m.add_string(kind) m.add_int(chanid) - m.add_int(self.window_size) - m.add_int(self.max_packet_size) + m.add_int(self.default_window_size) + m.add_int(self.default_max_packet_size) if (kind == 'forwarded-tcpip') or (kind == 'direct-tcpip'): m.add_string(dest_addr[0]) m.add_int(dest_addr[1]) @@ -625,7 +625,7 @@ class Transport (threading.Thread): self.channel_events[chanid] = event = threading.Event() self.channels_seen[chanid] = True chan._set_transport(self) - chan._set_window(self.window_size, self.max_packet_size) + chan._set_window(self.default_window_size, self.default_max_packet_size) finally: self.lock.release() self._send_user_message(m) @@ -1953,7 +1953,7 @@ class Transport (threading.Thread): self._channels.put(my_chanid, chan) self.channels_seen[my_chanid] = True chan._set_transport(self) - chan._set_window(self.window_size, self.max_packet_size) + chan._set_window(self.default_window_size, self.default_max_packet_size) chan._set_remote_channel(chanid, initial_window_size, max_packet_size) finally: self.lock.release() @@ -1961,8 +1961,8 @@ class Transport (threading.Thread): m.add_byte(cMSG_CHANNEL_OPEN_SUCCESS) m.add_int(chanid) m.add_int(my_chanid) - m.add_int(self.window_size) - m.add_int(self.max_packet_size) + m.add_int(self.default_window_size) + m.add_int(self.default_max_packet_size) self._send_message(m) self._log(INFO, 'Secsh channel %d (%s) opened.', my_chanid, kind) if kind == 'auth-agent@openssh.com': |