1#ifndef WIRED_SRVLOOP_BODY_WINDOW_H
2#define WIRED_SRVLOOP_BODY_WINDOW_H
12#define BODYWIN_CAP 2048
21 BODYWIN_FRAME_UNEXPECTED,
25typedef int (*bodywin_sink)(
void* ctx,
wired_span chunk,
int fin);
64int bodywin_pump(
bodywin* w,
u8* buf, bodywin_sink fn,
void* ctx);
67typedef int (*bodywin_capsule_fn)(
void* ctx,
u64 type,
wired_span value);
73#define BODYWIN_CAPSULE_CAP (16 + 4 + 1024)
Value-type views that fold the SDK's recurring argument shapes into single parameters,...
Capsule bytes carried over between DATA frames and calls: a capsule may straddle any number of them.
Definition body_window.h:77
u64 skip
value bytes of an oversized capsule still to drop
Definition body_window.h:78
usz n
bytes held in buf
Definition body_window.h:79
u8 buf[BODYWIN_CAPSULE_CAP]
the held capsule bytes
Definition body_window.h:80
One request stream's receive window over a caller-owned BODYWIN_CAP buffer: buf[0] is stream offset b...
Definition body_window.h:33
u64 left
payload bytes left in the frame being parsed
Definition body_window.h:35
u8 state
BODYWIN_*.
Definition body_window.h:42
u64 base
stream offset of buf[0]
Definition body_window.h:34
u8 fin
final size known
Definition body_window.h:39
u8 have[BODYWIN_CAP/8]
bit i: buf[i] received
Definition body_window.h:38
u64 fin_off
final size, valid once fin
Definition body_window.h:36
u8 is_data
the frame being parsed is DATA
Definition body_window.h:41
u64 granted
base at the last credit raise (0: initial credit only)
Definition body_window.h:37
u8 on
HEADERS consumed, body streaming.
Definition body_window.h:40
Read-only view of a byte range.
Definition span.h:30
u64 usz
unsigned size (size_t equivalent)
Definition types.h:20
unsigned char u8
unsigned 8-bit integer / byte
Definition types.h:18
unsigned long u64
unsigned 64-bit integer
Definition types.h:13