def __init__(self): self.helper = self.Helper(self) self.listener = Params.PROTOCOL.Listener(self.helper) #init the thread Thread.__init__(self) self.setName("Server") self.isUp = Event() ProbeStorage.addSelfProbe()
def manageQuit(cls, action): """Quit the overlay nicely Tells everyone about this :param action: Quit action """ assert isinstance(action, a.Quit) cls.logger.debug("Managing Quit task") cls.logger.info("Exiting the overlay") try: Client.broadcast(Bye("", Identification.PROBE_ID), toMyself=False) except ProbeConnectionException as e: cls.logger.warning("Could not sent Bye message %s", e) # Other commands to close all connections, etc Client.allMessagesSent() ProbeStorage.clearAllProbes() cls.logger.info("All probes cleared, all connections closed.") ProbeStorage.addSelfProbe() cls.logger.info("Re-added the localhost probe, ready to proceed again")
def manageQuit(cls, action): """Quit the overlay nicely Tells everyone about this :param action: Quit action """ assert isinstance(action, a.Quit) cls.logger.debug("Managing Quit task") cls.logger.info("Exiting the overlay") try: Client.broadcast(Bye("", Identification.PROBE_ID), toMyself = False) except ProbeConnectionException as e: cls.logger.warning("Could not sent Bye message %s", e) # Other commands to close all connections, etc Client.allMessagesSent() ProbeStorage.clearAllProbes() cls.logger.info("All probes cleared, all connections closed.") ProbeStorage.addSelfProbe() cls.logger.info("Re-added the localhost probe, ready to proceed again")