|
wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
|
One request stream's cross-datagram reassembly state — everything the original single-stream wired_srvloop held, now per stream id. More...
#include <srvloop.h>
Data Fields | |
| int | in_use |
| 0 = free slot | |
| u64 | stream_id |
| the client bidi stream id this slot reassembles | |
| wired_h3reqdrive_req | req |
| the decoded request, valid once req_done | |
| u8 | req_scratch [WIRED_H3_MAX_FIELD_SECTION] |
| backing store for req's path/body views; sized to the advertised SETTINGS_MAX_FIELD_SECTION_SIZE (one shared constant) so any field section the peer kept within our limit decodes without truncation | |
| u8 | req_buf [BODYWIN_CAP] |
| offset-indexed request stream bytes | |
| usz | req_len |
| highest offset+len written into req_buf | |
| u8 | req_fin |
| 1 once a request-stream FIN was seen | |
| int | req_done |
| 1 once this request was decoded/answered | |
| int | req_incomplete |
| RFC 9114 4.1: 1 once this stream's FIN arrived without enough of the request to decode (e.g. | |
| u8 | req_wrap [2080] |
| backing store for req's path/body views once decoded (see drive_complete in dispatch.c); must outlive the decode call, so it lives here rather than a stack local that dies on return | |
| h3_priority | priority |
| RFC 9218 4.1/7.1: this stream's current response priority, applied by a PRIORITY_UPDATE frame on the peer's control stream (see wired_srvloop_priority_apply) and defaulted (u=3, i=0) whenever the slot is (re)claimed – a request that never receives a PRIORITY_UPDATE keeps whatever the Priority request header field set (RFC 9218 5), unaffected by this field. | |
| int | req_over |
| 1 once a STREAM frame reached past req_buf's window: past the stream's credit (RFC 9000 4.1), latched into flow_control_violation. | |
| u8 | qpack_settled |
| RFC 9204 4.4.1 / 4.4.2: 1 once this stream's Section Acknowledgment or Stream Cancellation was queued (or none was owed) – the decoder sends at most one of the two per stream. | |
| bodywin | body |
| RFC 9000 2.2/4.1: req_buf as a receive window – which bytes arrived (so only the contiguous prefix is ever read) and, once the request body streams to the app, where req_buf[0] sits in the stream. | |
One request stream's cross-datagram reassembly state — everything the original single-stream wired_srvloop held, now per stream id.
free (in_use == 0) until first claimed by wired_srvloop_step for a stream id, and freed again once its request has been answered (mirroring the old single-slot re-arm in wired_srvloop_step).
| int wired_srvloop_stream_slot::req_incomplete |
RFC 9114 4.1: 1 once this stream's FIN arrived without enough of the request to decode (e.g.
a truncated HEADERS frame) – req_done is also set in this case (decode is attempted at most once), but no request was produced. Distinguishes "answered" from "must be aborted with H3_REQUEST_INCOMPLETE" for whichever layer reaps this slot.