Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)