示例#1
0
 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()
示例#2
0
 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()
示例#3
0
 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")
示例#4
0
 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")