Skip to content

socket_collector

qoa4ml.collector.socket_collector

Classes

SocketCollector

TCP socket collector that forwards each received frame to process_report.

Provides start_collecting() for running the server (blocking) and stop() for a clean shutdown. The accept loop uses a short timeout so shutdown requests are honoured promptly even with no pending connection.

Functions
start_collecting()

Run the TCP server until stop() is called.

Each incoming connection is read to EOF, decoded as UTF-8, and passed to process_report. Errors on a single connection are logged and do not terminate the server.

stop()

Signal the accept loop to exit and close the listening socket.