diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-03-03 18:24:04 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-03-03 18:24:04 -0800 |
commit | 72a73f55fae697fe3b940f378664a7c58214647f (patch) | |
tree | 553609aaa777980503536d76f074b74e1a3551ba /paramiko/packet.py | |
parent | 4e9af2f7ca91613ea4c60ca22b96adc2247b1ba2 (diff) | |
parent | c0fcd11ea0074d8cd019ed7087282754ea3ff792 (diff) | |
download | paramiko-72a73f55fae697fe3b940f378664a7c58214647f.tar.gz |
Merge branch '1.10' into 1.11
Conflicts:
fabfile.py
paramiko/__init__.py
Diffstat (limited to 'paramiko/packet.py')
-rw-r--r-- | paramiko/packet.py | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/paramiko/packet.py b/paramiko/packet.py index af807956..62cda219 100644 --- a/paramiko/packet.py +++ b/paramiko/packet.py @@ -17,7 +17,7 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -Packetizer. +Packet handling """ import errno @@ -103,7 +103,7 @@ class Packetizer (object): def set_log(self, log): """ - Set the python log object to use for logging. + Set the Python log object to use for logging. """ self.__logger = log @@ -167,17 +167,15 @@ class Packetizer (object): def need_rekey(self): """ - Returns C{True} if a new set of keys needs to be negotiated. This + Returns ``True`` if a new set of keys needs to be negotiated. This will be triggered during a packet read or write, so it should be checked after every read or write, or at least after every few. - - @return: C{True} if a new set of keys needs to be negotiated """ return self.__need_rekey def set_keepalive(self, interval, callback): """ - Turn on/off the callback keepalive. If C{interval} seconds pass with + Turn on/off the callback keepalive. If ``interval`` seconds pass with no data read from or written to the socket, the callback will be executed and the timer will be reset. """ @@ -189,12 +187,11 @@ class Packetizer (object): """ Read as close to N bytes as possible, blocking as long as necessary. - @param n: number of bytes to read - @type n: int - @return: the data read - @rtype: str - @raise EOFError: if the socket was closed before all the bytes could - be read + :param int n: number of bytes to read + :return: the data read, as a `str` + + :raises EOFError: + if the socket was closed before all the bytes could be read """ out = '' # handle over-reading from reading the banner line @@ -331,8 +328,8 @@ class Packetizer (object): Only one thread should ever be in this function (no other locking is done). - @raise SSHException: if the packet is mangled - @raise NeedRekeyException: if the transport should rekey + :raises SSHException: if the packet is mangled + :raises NeedRekeyException: if the transport should rekey """ header = self.read_all(self.__block_size_in, check_rekey=True) if self.__block_engine_in != None: |