Skip to main content

Module request

Module request 

Source
Expand description

Request lifecycle helpers.

Request handling splits into two layers: request-side data manipulation (which fragments are done, which are in error, what error to send) and connection-side plumbing (timeout queues, recv/send done callbacks, peer forwarding).

This module owns the data-side helpers; the connection-side helpers land in Stage 9 once the connection FSM exists.

Functionsยง

is_done
True when the request has been resolved end-to-end: a response has been selected, all fragments are accounted for, and (for fragment vectors) the parent fragment has finished aggregating.
is_error
True when the request is in error: either marked directly or flagged through fragment-error propagation.
move_completed
Drain from of every request whose selected_rsp matches id and forward them to to.
set_error
Mark req as in-error with error_code (a libc errno-shaped value) and the matching dyn_error_code. The flag is set so the response path can synthesise an error reply on the next pass.