|
wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
|
One WebTransport bidi stream's cross-datagram reassembly state (draft- ietf-webtrans-http3-15 4.3). More...
#include <srvloop.h>
Data Fields | |
| int | in_use |
| 0 = free slot | |
| u64 | stream_id |
| the WT bidi stream id this slot reassembles | |
| usz | sig_len |
| bytes the leading 0x41 signal varint itself occupied on the wire (RFC 9000 16: 2 for 0x41's own encoding, but recorded rather than assumed) — every later (offset>0) frame's stream-relative offset is shifted back by this much to land in the same post-signal coordinate space buf uses. | |
| wired_srvloop_wt_window | win |
| receive-window bookkeeping, see its doc | |
| u8 | buf [WIRED_SRVLOOP_WT_BUF_CAP] |
| offset-indexed bytes past the signal varint, relative to win.base (offset 0 of this buffer is win.base's own first application byte). | |
| u8 | fin |
| 1 once this stream's FIN was seen | |
| u64 | fin_off |
| the absolute offset FIN was seen at; valid only when fin | |
| int | offered |
| 1 once wired_wt_session_offer_stream has been called for this slot's stream_id (the caller driving the loop, e.g. | |
| int | wt_session_slot |
| The session slot index (srvrun.c's wt/wt1, see SRVRUN_MAX_WT_SESSIONS) this stream was offered to, valid only once offered is set; -1 while unoffered. | |
| u64 | delivered_len |
| how much of the stream (in win.base + win.frontier terms, i.e. | |
| int | fin_delivered |
| 1 once a fin=1 delivery has been made to the app-facing stream-data callback for this slot; distinguishes "FIN already delivered" from "delivered_len==0, nothing sent yet" for a stream whose FIN carries no bytes (delivered_len alone cannot tell those two apart when len==0). | |
| u64 | credit_advertised |
| RFC 9000 4.1/19.10: the MAX_STREAM_DATA value last advertised to the peer for this stream (0 before any raise past the initial transport parameter), so the caller driving the loop (srvrun.c) can tell whether the window has advanced enough to be worth re-announcing – an advertisement MUST NOT decrease, so this only ever grows. | |
One WebTransport bidi stream's cross-datagram reassembly state (draft- ietf-webtrans-http3-15 4.3).
free (in_use == 0) until the stream's leading 0x41 signal frame is first sighted, OR (server-initiated bidi, RFC 9000 2.1 id bits 01) pre-claimed by srvrun.c at wired_server_wt_open_bidi time with sig_len left 0 — such a stream carries no signal prefix at all, the client's reply bytes start at its own offset 0. buf holds the stream's bytes AFTER the signal varint — the signal itself is not application data and is skipped before writing (see gather_wt_stream in dispatch.c).
| u8 wired_srvloop_wt_stream_slot::buf[WIRED_SRVLOOP_WT_BUF_CAP] |
offset-indexed bytes past the signal varint, relative to win.base (offset 0 of this buffer is win.base's own first application byte).
ponytail: a write outside [win.base, win.base + cap) is dropped (either stale or past the granted window), same truncate-on-overflow policy family as wired_srvloop_stream_slot's req_buf.
| u64 wired_srvloop_wt_stream_slot::delivered_len |
how much of the stream (in win.base + win.frontier terms, i.e.
an absolute offset) the caller driving the loop (srvrun.c) has already delivered to an app-facing stream-data callback; the loop itself never reads this, it only resets it to 0 on claim (mirrors offered's split: the loop owns reassembly, the caller owns delivery bookkeeping).
| int wired_srvloop_wt_stream_slot::offered |
1 once wired_wt_session_offer_stream has been called for this slot's stream_id (the caller driving the loop, e.g.
srvrun.c, sets this after offering — the loop itself does not know about wired_wt_session). Kept here rather than re-derived so the association happens exactly once per stream regardless of how many steps its data arrives across.
| usz wired_srvloop_wt_stream_slot::sig_len |
bytes the leading 0x41 signal varint itself occupied on the wire (RFC 9000 16: 2 for 0x41's own encoding, but recorded rather than assumed) — every later (offset>0) frame's stream-relative offset is shifted back by this much to land in the same post-signal coordinate space buf uses.
0 for a server-initiated bidi stream (srvrun.c's pre-claim), which has no signal at all.
| int wired_srvloop_wt_stream_slot::wt_session_slot |
The session slot index (srvrun.c's wt/wt1, see SRVRUN_MAX_WT_SESSIONS) this stream was offered to, valid only once offered is set; -1 while unoffered.
Recorded so a session's own close (srvrun_close_wt_on_stream_ close) can find exactly the streams it owns among possibly several open sessions on the same connection, rather than every wt_streams[] entry regardless of which session claimed it.