INNER CODE UNIT · Python

_request_without_capability_check

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

    def _request_without_capability_check(self, message, timeout=15):
        if not isinstance(message, bytes):
            message = message.encode('utf-8')

        raw_message = b'%d:%s' % (self.send_message_id, message)
        if not self.send(raw_message):
            raise ConnectionError('Failed to send: socket is closed')

        self.send_message_id += 1
        self.recv_num_q.put(-1)
        try:
            response = self.recv_data_q.get(timeout=timeout)
        except Empty as exception:
            raise TimeoutError(f'Request timed out after {timeout} seconds') from exception
        if isinstance(response, Exception):
            raise response
        return response

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…