示例#1
0
    def connect(self, protocolFactory):
        factory = Factory()
        factory.protocol = _CommandTransport
        factory.authFactory = self._authFactory
        factory.command = self._command
        factory.commandProtocolFactory = protocolFactory
        factory.commandConnected = Deferred()

        d = self._sshServer.connect(factory)
        d.addErrback(factory.commandConnected.errback)

        return factory.commandConnected
    def connect(self, protocolFactory):
        factory = Factory()
        factory.protocol = _CommandTransport
        factory.authFactory = self._authFactory
        factory.command = self._command
        factory.commandProtocolFactory = protocolFactory
        factory.commandConnected = Deferred()

        d = self._sshServer.connect(factory)
        d.addErrback(factory.commandConnected.errback)

        return factory.commandConnected