wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
Loading...
Searching...
No Matches
moqrawio.h File Reference

One wired_moqt_io table that serves both MoQT transports, so the hub never branches on transport for I/O. More...

Go to the source code of this file.

Data Structures

struct  moqrawio_backend
 The srvrun operations the mux forwards prefixed stream opens to, as a function-pointer table: the unity build links the real srvrun, so a test cannot stub wired_server_* by symbol and fills this with recorders instead. More...

Macros

#define MOQRAWIO_STAGE_BUF   65536
 Staging capacity for one prefixed stream-opening payload (signal + payload, copied once before the open call).

Functions

wired_moqt_io moqrawio_io (const moqrawio_backend *be)
 The transport-mux wired_moqt_io over backend be.
wired_moqt_io wired_moqraw_io (void)
 moqrawio_io over the real srvrun backend: the io table an application passes to wired_moqt_init so one hub serves WebTransport and raw-QUIC sessions alike.

Detailed Description

One wired_moqt_io table that serves both MoQT transports, so the hub never branches on transport for I/O.

The only per-transport step is the stream-opening prefix: a WebTransport session's stream begins with the WT signal (bidi 0x41 / uni 0x54 + session id, draft-ietf-webtrans-http3-15 4.2), a raw-QUIC session's stream begins with the MoQT bytes themselves (draft-ietf-moq-transport-19 3.3, -22 6.3). Every other op goes to the srvrun call as is: srvrun applies the remaining binding differences (reset code mapping, datagram qsid, session close shape) itself.

Macro Definition Documentation

◆ MOQRAWIO_STAGE_BUF

#define MOQRAWIO_STAGE_BUF   65536

Staging capacity for one prefixed stream-opening payload (signal + payload, copied once before the open call).

Sized to srvrun's per-stream send staging (SRVRUN_WTSEND_BUF, 65536), the most one opening round can carry anyway, and equal to the moqt_interop example's former private buffer it replaces. A larger payload is refused (-1) on both transports.

Function Documentation

◆ moqrawio_io()

wired_moqt_io moqrawio_io ( const moqrawio_backend * be)

The transport-mux wired_moqt_io over backend be.

Ops behave per transport as follows (be->is_raw decides):

  • open_bidi_stream / send_uni / open_uni_stream: WT prefixes the bidi/uni signal; raw sends the payload byte for byte.
  • send_budget: WT returns the WT_MAX_DATA remainder (max_data - sent_data, 0 once exceeded, (usz)-1 when the peer set no limit); raw returns (usz)-1 (QUIC MAX_DATA is enforced by srvrun's own send credit; raw has no session-level credit, RFC 9000 4.1).
  • send_uni2: 0 (unused by the relay paths).
  • every other op: the wired_server_wt_* function of the same shape. The ops carry no context argument, so be is held process-wide: the last call wins, and be must outlive every use of the returned table.
    Parameters
    bethe backend; must not be 0
    Returns
    the filled table

◆ wired_moqraw_io()

wired_moqt_io wired_moqraw_io ( void )

moqrawio_io over the real srvrun backend: the io table an application passes to wired_moqt_init so one hub serves WebTransport and raw-QUIC sessions alike.

Returns
the filled table