Function named_pipe_server_routine
async fn named_pipe_server_routine(
server: NamedPipeServer,
receiver: &mut Receiver<[u8; 13]>,
)Expand description
Wait for the named pipe server to connect, then forward serialized input records read from the broadcast channel to the named pipe server.
If writing to the pipe fails the pipe is closed and the routine ends.
To detect if a client is still alive even if we are currently
not sending data, we send a “keep alive packet”,
SERIALIZED_INPUT_RECORD_0_LENGTH bytes of 1s. If that fails, the routine ends.
§Arguments
server- The named pipe server over which we send data to the client.receiver- The receiving end of the broadcast channel through which we get the serialize input records from the main thread that are to be sent to the client via the named pipe.