ReceiveWorker#
- class FIREQ_CLIENT.network.receive_worker.ReceiveWorker(sock: socket)[source]#
Bases:
objectReads framed messages from a socket in a background thread.
- stop(timeout: float | None = None) None[source]#
Stop the reading thread and close the socket.
- Parameters:
timeout (float | None) – how long to wait for the thread to stop.
- get_message(block: bool = True, timeout: float | None = None) Message[source]#
Retrieve the next message from the queue.
- Parameters:
block (bool) – block until a message is available.
timeout (float | None) – how long to wait before raising queue.Empty.
- Returns:
the next message.
- Return type:
- property message_queue: Queue#
Return the underlying queue.