SendWorker#

class FIREQ_SERVER.network.send_worker.SendWorker(client_connected: Event, logger: Logger = None)[source]#

Bases: object

Worker thread that handles outgoing messages to the client socket.

Waits for the client connected event to be set, which is done by the main thread. Then, it will start popping items from the queue_out queue and sending them to the client socket.

start() → None[source]#

Start the send worker thread.

stop() → None[source]#

Stop the send worker thread.

The thread will be joined with a timeout of 2 seconds.

clear_output_queue() → None[source]#

Empty the output queue.