INNER CODE UNIT · Python

receive

unrealcv/unrealcv · client/python/unrealcv/__init__.py:401

    def receive(self):
        """
        Receive packages, Extract message from packages
        Call self.message_handler if got a message
        Also check whether client is still connected
        """
        if self.isconnected():
            # Only this thread is allowed to read from socket, otherwise need lock to avoid competing
            message = SocketMessage.ReceivePayload(self.sock)

            # message may be None here
            # _L.debug('Got server raw message with length %d', len(message))

            if not message:
                print('BaseClient: can not receive message from server')
                _L.debug('BaseClient: can not receive message from server')
                
                delay = self.RECONNECT_BASE_DELAY

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…