Skip to main content

read_command

Function read_command 

Source
pub async fn read_command(stream: &mut IpcStream) -> DaemonResult<DaemonCommand>
Expand description

Read a command from a client connection.

Used by the daemon to receive commands from clients. Size enforcement (TIGER-P3-03) happens upstream inside IpcStream::recv_raw, which now bounds the read with AsyncReadExt::take(MAX_MESSAGE_SIZE + 1) BEFORE allocation. Any payload exceeding the limit is rejected with DaemonError::InvalidMessage before this function runs, so no post-allocation re-check is needed here (#17, #25).