Skip to main content

handle_stream_client_command

Function handle_stream_client_command 

Source
pub async fn handle_stream_client_command<W, P>(
    protocol: &P,
    write_half: &Arc<Mutex<W>>,
    command: ClientCommand,
    client_id: ClientId,
    state: &AppState,
    status_tx: &UnboundedSender<String>,
) -> bool
where W: AsyncWrite + Unpin, P: Client + ?Sized,
Expand description

Generic command-arm body for split-stream clients. Executes the action, maps the result to wire writes, records a client access-log entry, and replies on the command’s oneshot.

Returns true when the action requested disconnect and the loop should break (the reply is sent before returning).