コード例 #1
0
ファイル: SimpleClient.py プロジェクト: makeittotop/py_queue
    def close(self, msg='quit'):
        """Closes the connection with the server by sending 'quit'
        to cleanly close the connection."""

        if msg:
            try:
                self.sendCmd('quit', readresp=0)
            # it's possible that we are already disconnected
            except Sockets.SocketError:
                pass

        ClientServerSocket.close(self)
コード例 #2
0
    def close(self, msg='quit'):
        """Closes the connection with the server by sending 'quit'
        to cleanly close the connection."""

        if msg:
            try:
                self.sendCmd('quit', readresp=0)
            # it's possible that we are already disconnected
            except Sockets.SocketError:
                pass

        ClientServerSocket.close(self)
コード例 #3
0
ファイル: GenericClient.py プロジェクト: makeittotop/py_queue
    def close(self, msg='quit'):
        """Close the connection with server."""

        # if this is a keepalive connection then make sure we tell the
        # server that we are done.
        if self.keepalive and msg:
            try:
                self.send({'close': msg}, timeout=self.timeout)
            # it's possible that we are already disconnected
            except Sockets.SocketError:
                pass

        ClientServerSocket.close(self)
コード例 #4
0
ファイル: GenericClient.py プロジェクト: makeittotop/py_queue
    def close(self, msg='quit'):
        """Close the connection with server."""

        # if this is a keepalive connection then make sure we tell the
        # server that we are done.
        if self.keepalive and msg:
            try:
                self.send({'close': msg}, timeout=self.timeout)
            # it's possible that we are already disconnected
            except Sockets.SocketError:
                pass

        ClientServerSocket.close(self)