def __receiving(self):
    '\n        Receive packages, Extract message from packages\n        Call self.message_handler if got a message\n        Also check whether client is still connected\n        '
    _L.debug('BaseClient start receiving in %s', threading.current_thread().name)
    while True:
        if self.isconnected():
            message = SocketMessage.ReceivePayload(self.socket)
            _L.debug('Got server raw message %s', message)
            if (not message):
                _L.debug('BaseClient: remote disconnected, no more message')
                self.socket = None
                continue
            if message.startswith(b'connected'):
                _L.info('Got connection confirm: %s', repr(message))
                self.wait_connected.set()
                continue
            if self.raw_message_handler:
                self.raw_message_handler(message)
            else:
                _L.error('No message handler for raw message %s', message)
Receive packages, Extract message from packages
Call self.message_handler if got a message
Also check whether client is still connected
def __receiving(self):
    '\n        Receive packages, Extract message from packages\n        Call self.message_handler if got a message\n        Also check whether client is still connected\n        '
    _L.debug('BaseClient start receiving in %s', threading.current_thread().name)
    while True:
        if self.isconnected():
            message = SocketMessage.ReceivePayload(self.socket)
            _L.debug('Got server raw message %s', message)
            if (not message):
                _L.debug('BaseClient: remote disconnected, no more message')
                self.socket = None
                continue
            if message.startswith(b'connected'):
                _L.info('Got connection confirm: %s', repr(message))
                self.wait_connected.set()
                continue
            if self.raw_message_handler:
                self.raw_message_handler(message)
            else:
                _L.error('No message handler for raw message %s', message)