|
wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
|
One peer-opened request stream (draft-ietf-moq-transport-19 3.3): its own reassembly and reply queue (the same ARMED/PENDING pair as wired_moqtrun_peer.send_bufs, at request-stream size). More...
#include <moqtrun.h>
Data Fields | |
| int | in_use |
| 1 while the slot tracks a request stream. | |
| wired_wt_session * | wt |
| Session the stream belongs to (owned by the transport). | |
| u64 | stream_id |
| The request stream's id on wt. | |
| u64 | kind |
| Type of the stream's first message; 0 until it arrives. | |
| u64 | request_id |
| That message's Request ID: what a reset cancels. | |
| int | opened |
| 1 once stream_reply_open has accepted the first reply round. | |
| wired_moqtrun_ctl_asm | in |
| Reassembly of the peer's messages on the stream. | |
| u8 | send_bufs [2][WIRED_MOQTRUN_REQ_SEND_BUF] |
| ARMED/PENDING reply buffers (wired_moqtrun_peer.send_bufs). | |
| usz | send_lens [2] |
| Bytes queued in each send_bufs slot (same index). | |
| int | armed_idx |
| The send_bufs slot (0 or 1) last handed to stream_send. | |
| u64 | pending_updates |
| REQUEST_UPDATEs received but not yet answered by a flushed reply (draft-19 10.9/10.4 MAX_REQUEST_UPDATES): one more than the setup limit closes the session. | |
| int | goaway |
| 1 once a GOAWAY arrived on the stream (draft 10.4: at most one). | |
| int | live |
| 1 once the request established a subscription or track: it stays open until cancelled or the session ends. | |
| u8 | rdv_held |
| 1 while this SUBSCRIBE is held for a publisher (hub->rdv): owed an answer, so moqtrun_req_answered must not read kind && !live as complete and FIN it (draft-19 3.3.2: no FIN before the response). | |
| int | fin_in |
| 1 once the peer's side ended (FIN). | |
| int | fin_out |
| 1 once the hub's side ended (FIN, or a reset). | |
| int | done_pending |
| 1 while this subscription's PUBLISH_DONE waits for a held fill (no stream may open after it); done_status / done_count are the message to send once the fill's stream is granted. | |
| u64 | done_status |
| The held PUBLISH_DONE's Status Code. | |
| u64 | done_count |
| The held PUBLISH_DONE's Stream Count. | |
| u8 | ns [WIRED_MOQTRUN_MAX_NS] |
| PUBLISH_NAMESPACE: the Track Namespace; SUBSCRIBE_NAMESPACE: the Track Namespace Prefix (draft-ietf-moq-transport-19 10.15/10.18), encoded as on the wire (count + Length-prefixed fields). | |
| usz | ns_len |
| Bytes of ns in use. | |
| u64 | ns_seen [(WIRED_MOQTRUN_MAX_REQS+63)/64] |
| SUBSCRIBE_NAMESPACE: bit i is set while a NAMESPACE for reqs[i] has gone out with no NAMESPACE_DONE after it (10.18). | |
| u64 | attempted_tag [WIRED_MOQTRUN_MAX_SESSIONS *WIRED_MOQTRUN_MAX_TRACKS_PER_PEER] |
| SUBSCRIBE_TRACKS only (10.19-10.20): per hub track slot (flat index session*WIRED_MOQTRUN_MAX_TRACKS_PER_PEER+track), the cache_tag of the track incarnation this SUBSCRIBE_TRACKS already tried a PUBLISH or PUBLISH_SKIPPED for – 0 means "never tried". | |
| u64 | pub_origin_rid |
| A hub-opened PUBLISH request slot only (10.9, sent as a result of SUBSCRIBE_TRACKS): the request_id of the SUBSCRIBE_TRACKS that caused this PUBLISH – fill-design's owner_rid pattern (a request_id, never a pointer/index into that slot), so this PUBLISH stream stays valid and self-contained even if the SUBSCRIBE_TRACKS slot is cancelled or reused first. | |
| u64 | pub_track_tag |
| A hub-opened PUBLISH request slot only: the wired_moqtrun_track. | |
| u64 | pub_alias |
| A hub-opened PUBLISH request slot only: the Track Alias it named (moqtrun_session_alias), reserved in that session for that track. | |
| u8 | has_forward |
| SUBSCRIBE_TRACKS (10.19.1, draft-22 3.6.2): FORWARD and GROUP_ORDER as received, copied into every PUBLISH it generates and into that PUBLISH's own slot, whose subscription starts from them – has_forward 1 iff FORWARD was present (forward its value, else the PUBLISH omits it); group_order the raw Parameter value, 0 for absent (publisher's default, PUBLISH omits it too). | |
| u8 | forward |
| FORWARD's value (0 or 1), valid when has_forward. | |
| u8 | group_order |
| GROUP_ORDER as received; 0 = absent. | |
| wired_moqtrun_rngrow | rngf [WIRED_MOQTRUN_MAX_FILTER_RANGES] |
| SUBSCRIBE_TRACKS and the PUBLISH slots it opens: the object Range Filter rows it carried (draft-22 3.6.1, draft-19 10.19.1), the resulting subscription's initial rows; never in the PUBLISH (22 9.8). | |
| u8 | rngf_n |
| Rows of rngf in use. | |
| u8 | pub_answered |
| A hub-opened PUBLISH slot only: 1 once its one REQUEST_OK arrived (18/19 5.1, 22 3.1: a second response closes the session). | |
One peer-opened request stream (draft-ietf-moq-transport-19 3.3): its own reassembly and reply queue (the same ARMED/PENDING pair as wired_moqtrun_peer.send_bufs, at request-stream size).
| u64 wired_moqtrun_req::attempted_tag[WIRED_MOQTRUN_MAX_SESSIONS *WIRED_MOQTRUN_MAX_TRACKS_PER_PEER] |
SUBSCRIBE_TRACKS only (10.19-10.20): per hub track slot (flat index session*WIRED_MOQTRUN_MAX_TRACKS_PER_PEER+track), the cache_tag of the track incarnation this SUBSCRIBE_TRACKS already tried a PUBLISH or PUBLISH_SKIPPED for – 0 means "never tried".
Compared against the live track's wired_moqtrun_track.cache_tag (never 0 once claimed), so a slot reused by a newer PUBLISH reads as untried again without a separate generation field.
| int wired_moqtrun_req::fin_out |
1 once the hub's side ended (FIN, or a reset).
The slot is freed when both sides have ended.
| u64 wired_moqtrun_req::ns_seen[(WIRED_MOQTRUN_MAX_REQS+63)/64] |
SUBSCRIBE_NAMESPACE: bit i is set while a NAMESPACE for reqs[i] has gone out with no NAMESPACE_DONE after it (10.18).
reqs[i] is not reused while any live subscription holds its bit, so its namespace stays readable for the NAMESPACE_DONE still owed.
| u64 wired_moqtrun_req::pending_updates |
REQUEST_UPDATEs received but not yet answered by a flushed reply (draft-19 10.9/10.4 MAX_REQUEST_UPDATES): one more than the setup limit closes the session.
A flush answers every update coalesced in the queue at once, so it resets this to 0 rather than decrementing one at a time.
| u64 wired_moqtrun_req::pub_origin_rid |
A hub-opened PUBLISH request slot only (10.9, sent as a result of SUBSCRIBE_TRACKS): the request_id of the SUBSCRIBE_TRACKS that caused this PUBLISH – fill-design's owner_rid pattern (a request_id, never a pointer/index into that slot), so this PUBLISH stream stays valid and self-contained even if the SUBSCRIBE_TRACKS slot is cancelled or reused first.
0 for a PUBLISH not opened this way (every other request slot, and a client-opened PUBLISH).
| u64 wired_moqtrun_req::pub_track_tag |
A hub-opened PUBLISH request slot only: the wired_moqtrun_track.
cache_tag of the track incarnation this PUBLISH announced – the fill-design owner_rid/cache_tag pattern (moqtrun_fills_upstream_gone's own doc), so a track's retirement can find and reset every PUBLISH stream it opened without this slot holding a pointer/index into the track. 0 for a PUBLISH not opened this way.