Пример #1
0
 def loseConnection(self):
     print "transport.loseConnection()"
     if protocolStorage.sendBuffer:
         task.deferLater(reactor, 2, self.retransmission)
     self.retransmission()
     closePacket = createMessage("CLOSE", self.SEQ, self.ACK)
     if self.transportOf == "server":
         closePacket.sessionID = protocolStorage.serverSessionID
         closePacket.signature = signMessage(closePacket.__serialize__(), protocolStorage.serverPrivateKey)
     else:
         closePacket.sessionID = protocolStorage.clientSessionID
         closePacket.signature = signMessage(closePacket.__serialize__(), protocolStorage.clientPrivateKey)
     print "Sending Close Request To Peer"
     self.lowerTransport().write(closePacket.__serialize__())
     StackingTransport.loseConnection(self)
Пример #2
0
 def closeConnection(self):
     logger.debug("RIP--%s", self.state)
     self.state = "CLOSED"
     StackingTransport.loseConnection(self)
Пример #3
0
 def loseConnection(self):
     g_logger.info("GateTransport %s to %s lose connection" %
                   (self.getHost(), self.getPeer()))
     return StackingTransport.loseConnection(self)