|
wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
|
One FETCH response being served from the hub cache: Objects of the track incarnation cache_tag in [cursor, end) go out on one uni stream (FETCH_HEADER, then fetch Objects, 11.4.4), one item per stream round as the transport accepts them. More...
#include <moqtrun.h>
Data Fields | |
| wired_wt_session * | wt |
| The requesting session (owned by the transport). | |
| u64 | request_id |
| The FETCH's Request ID (a fill: its subscription's). | |
| u64 | cache_tag |
| The track incarnation served (wired_moqtrun_track.cache_tag). | |
| moqctl_loc | cursor |
| Next Location to serve. | |
| moqctl_loc | end |
| First Location past the range. | |
| u64 | stream_id |
| The hub-opened uni stream the response goes out on. | |
| moqfetch_seq | seq |
| Fetch-Object encoding state carried between items (11.4.4). | |
| u64 | owner_rid |
| Fill only: the owning subscription's Request ID – with wt it is the owner key. | |
| moqctl_loc | lo |
| Descending only: the first Location of the whole range. | |
| u64 | last_ok_ms |
| Clock (wired_moqt_tick) of the last accepted round: a fetch refused for longer than WIRED_MOQTREL_STALL_MS is given up. | |
| wired_wt_session * | up_wt |
| The upstream session the FETCH went to. | |
| u64 | up_req_sid |
| The hub-opened request stream carrying the upstream FETCH. | |
| u64 | up_rid |
| The upstream FETCH's Request ID (its FETCH_HEADER names it). | |
| u64 | up_data_sid |
| The upstream fetch data stream. | |
| moqfetch_seq | up_seq |
| Fetch-Object decoding state of the upstream data stream. | |
| moqctl_loc | up_lo |
| Upstream Locations must lie in [up_lo, up_span_end): the range start and, ascending, the first Location the cache vouches for again (descending: the range end). | |
| moqctl_loc | up_span_end |
| See up_lo. | |
| moqctl_loc | up_last |
| The last relayed item's Location; valid iff has_up_last. | |
| u64 | up_pl_left |
| Payload bytes of the Object at up_last still to pass through as they arrive (its head and the bytes before went out already). | |
| u64 | up_pl_at |
| Payload bytes of that Object passed through so far. | |
| moqctl_loc | up_end |
| The upstream FETCH_OK End Location, inclusive; valid iff up_state is WIRED_MOQTRUN_UPF_OK. | |
| u64 | up_deadline_ms |
| Clock past which the upstream FETCH is cancelled. | |
| u64 | up_budget_ms |
| The leg's budget: min(FILL_TIMEOUT, WIRED_MOQTRUN_UPFETCH_BUDGET_MS). | |
| u64 | req_sid |
| no_track: the downstream request stream the answer goes on. | |
| int | in_use |
| 1 while the slot serves (or, in fetch_waits, holds) a fetch. | |
| int | opened |
| 1 once the stream is open (stream_id valid). | |
| int | is_fill |
| 1 when this fetch is a fill of a subscription (draft-22 SS9.20.15): it was opened by the hub, not requested by a FETCH. | |
| int | failed |
| Fill only: 1 once the upstream publisher left. | |
| int | descending |
| 1 when Group Order is Descending (11.4.4.1): [cursor, end) is then one group's window, stepped down a group at a time until lo's. | |
| int | up_state |
| WIRED_MOQTRUN_UPF_*: the upstream FETCH filling the front of the range. | |
| int | up_data_open |
| 1 once the upstream data stream up_data_sid is bound to this slot; it stays bound (later bytes are discarded) after the leg ends. | |
| int | up_data_end |
| 1 once the upstream data stream ended (FIN or reset). | |
| int | has_up_last |
| 1 once an upstream item was relayed. | |
| int | up_eot |
| The upstream FETCH_OK End Of Track. | |
| int | up_tmo |
| 1 when the cache side reports what it lacks as timed out: the budget ran out, or FILL_TIMEOUT was 0. | |
| int | no_track |
| 1 for a FETCH of a track the hub does not hold: its FETCH_OK waits for the upstream one. | |
| int | answered |
| no_track: 1 once the downstream FETCH was answered. | |
One FETCH response being served from the hub cache: Objects of the track incarnation cache_tag in [cursor, end) go out on one uni stream (FETCH_HEADER, then fetch Objects, 11.4.4), one item per stream round as the transport accepts them.
The cursor is a Location, never a pointer into the cache: an item is looked up again on every round, so eviction or a publisher leaving in between turns it into an End of Unknown Range instead of reading freed bytes.
| int wired_moqtrun_fetch::failed |
Fill only: 1 once the upstream publisher left.
An open fill was reset at once; a held one opens later only to reset (failure is signalled by open-then-reset, draft-22 3.3.4).
| u64 wired_moqtrun_fetch::owner_rid |
Fill only: the owning subscription's Request ID – with wt it is the owner key.
A fill outlives its subscription's PUBLISH_DONE until its own FIN, so no pointer or index into a reusable subscription slot is ever held.
| int wired_moqtrun_fetch::up_state |
WIRED_MOQTRUN_UPF_*: the upstream FETCH filling the front of the range.
While it is in flight the cache side neither serves nor stall-checks; [cursor, end) waits untouched for it to end.