Function read_client_pid
async fn read_client_pid(server: &NamedPipeServer) -> u32Expand description
Read the connecting client’s 4 byte little-endian process id from the pipe.
Reads exactly 4 bytes from server, retrying on WouldBlock, and decodes
them as a u32. Any non-recoverable I/O error panics, as a client that
cannot send its PID cannot be correlated and forwarding would be
impossible.
§Arguments
server- The connected named pipe server to read from.
§Returns
The process id sent by the client.
§Panics
Panics if the pipe is closed before 4 bytes can be read, or if any
non-WouldBlock I/O error occurs.