Example #1
0
    def clientConnected(self, protocol):
        self._protocol = protocol

        if IPersistentClientProtocol.providedBy(protocol):
            prd = protocol.notifyProtocolReady()
            prd.addCallback(
                lambda _: self.clientProtocolReady(protocol)).addErrback(
                    self.clientProtocolFailed)
        else:
            self.clientProtocolReady(protocol)
Example #2
0
    def clientConnected(self, protocol):
        self._protocol = protocol

        if IPersistentClientProtocol.providedBy(protocol):
            prd = protocol.notifyProtocolReady()
            prd.addCallback(
                lambda _: self.clientProtocolReady(protocol)
            ).addErrback(
                self.clientProtocolFailed
            )
        else:
            self.clientProtocolReady(protocol)
Example #3
0
    def clientConnected(self, protocol):

        # protocol may be used to abort connection in `stopService`
        self._protocol = protocol
        self._protocol_ready = False

        if IPersistentClientProtocol.providedBy(protocol):
            prd = protocol.notifyProtocolReady()
            prd.addCallback(
                lambda _: self.clientProtocolReady(protocol)).addErrback(
                    self.clientProtocolFailed)
        else:
            self.clientProtocolReady(protocol)
Example #4
0
    def clientConnected(self, protocol):

        # protocol may be used to abort connection in `stopService`
        self._protocol = protocol
        self._protocol_ready = False

        if IPersistentClientProtocol.providedBy(protocol):
            prd = protocol.notifyProtocolReady()
            prd.addCallback(
                lambda _: self.clientProtocolReady(protocol)
            ).addErrback(
                self.clientProtocolFailed
            )
        else:
            self.clientProtocolReady(protocol)