def enumerateSessions(self): """ Send a request to the Agent, asking it to enumerate all sessions. The response will be intercepted by a message handler, and the Sessions collection updated at some point in the future. """ self.write(SystemRequestFactory.listSessions().setId(999).build())
def listSessions(self): """ Get a list of active sessions on the Server. """ try: return self.sendAndReceive(SystemRequestFactory.listSessions()) except RuntimeError as e: if e.message == 'Received an empty response from the Agent. This normally means the remote service has crashed.': raise ConnectionError(e) else: raise
def listSessions(self): """ Get a list of active sessions on the Server. """ return self.sendAndReceive(SystemRequestFactory.listSessions())