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

def paramiko::transport::Transport::accept (   self,
  timeout = None 
)

Return the next channel opened by the client over this transport, in
server mode.  If no channel is opened before the given timeout, C{None}
is returned.

@param timeout: seconds to wait for a channel, or C{None} to wait
    forever
@type timeout: int
@return: a new Channel opened by the client
@rtype: L{Channel}

Definition at line 750 of file transport.py.

00750                                   :
        """
        Return the next channel opened by the client over this transport, in
        server mode.  If no channel is opened before the given timeout, C{None}
        is returned.
        
        @param timeout: seconds to wait for a channel, or C{None} to wait
            forever
        @type timeout: int
        @return: a new Channel opened by the client
        @rtype: L{Channel}
        """
        self.lock.acquire()
        try:
            if len(self.server_accepts) > 0:
                chan = self.server_accepts.pop(0)
            else:
                self.server_accept_cv.wait(timeout)
                if len(self.server_accepts) > 0:
                    chan = self.server_accepts.pop(0)
                else:
                    # timeout
                    chan = None
        finally:
            self.lock.release()
        return chan

    def connect(self, hostkey=None, username='', password=None, pkey=None):


Generated by  Doxygen 1.6.0   Back to index