Function inbound

Source
pub fn inbound(
    config: InboundConfig,
    tx: UnboundedSender<TaskResult>,
    socket_rx: Box<dyn DataLinkReceiver>,
)
Expand description

Listen for incoming packets Creates two threads, one that listens on the socket and another that forwards results to the orchestrator and shuts down the receiving socket when appropriate. Makes sure that the received packets are valid and belong to the current measurement.

§Arguments

  • ‘config’ - configuration for the inbound worker thread

  • ‘tx’ - sender to put task results in

  • ‘socket_rx’ - the socket to listen on

§Panics

Panics if the measurement type is invalid