Logo Search packages:      
Sourcecode: paramiko version File versions  Download package

def paramiko::transport::Transport::set_keepalive (   self,
  interval 
)

Turn on/off keepalive packets (default is off).  If this is set, after
C{interval} seconds without sending any data over the connection, a
"keepalive" packet will be sent (and ignored by the remote host).  This
can be useful to keep connections alive over a NAT, for example.

@param interval: seconds to wait before sending a keepalive packet (or
    0 to disable keepalives).
@type interval: int

@since: fearow

Definition at line 694 of file transport.py.

00694                                      :
        """
        Turn on/off keepalive packets (default is off).  If this is set, after
        C{interval} seconds without sending any data over the connection, a
        "keepalive" packet will be sent (and ignored by the remote host).  This
        can be useful to keep connections alive over a NAT, for example.
        
        @param interval: seconds to wait before sending a keepalive packet (or
            0 to disable keepalives).
        @type interval: int

        @since: fearow
        """
        self.packetizer.set_keepalive(interval,
            lambda x=self: x.global_request('keepalive@lag.net', wait=False))

    def global_request(self, kind, data=None, wait=True):


Generated by  Doxygen 1.6.0   Back to index