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