Skip to content

Expose the QUIC idle timeout in the endpoint configuration - #66

Merged
rwl4 merged 4 commits into
mainfrom
feat/endpoint-idle-timeout
Nov 16, 2026
Merged

rwl4 merged 4 commits into
mainfrom
feat/endpoint-idle-timeout

Conversation

@gwendalsimon

@gwendalsimon gwendalsimon commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

moq_endpoint_cfg_t gains idle_timeout_ms, the QUIC idle timeout of a raw-QUIC picoquic client. A client then notices a vanished relay within that time. picoquic defaults to 30 s. The keepalive runs at half the timeout, capped at today's 15 s. With 0, or an older caller, nothing changes. Resolve rejects a value under 1000 ms with MOQ_ERR_INVAL, because picoquic also uses it as the handshake timeout. Other transports refuse a non-zero value (MOQ_ERR_UNSUPPORTED).

We tested the change in November 2026:

  • The keepalive test sees 15 s with no timeout, 1500 ms with 3000 ms, and 15 s with 60000 ms.
  • Resolve tests cover the size gate, the lower bound, and the WebTransport refusal.
  • ABI layout tests pin the new field.
  • On separate hosts, a test build with 3000 ms at both ends cut the output break after a relay restart from 31.4 s to 4.7 s.

This change is Reviewable

gwendalsimon and others added 4 commits November 10, 2026 15:13
moq_endpoint_cfg_t gains idle_timeout_ms, appended and gated by
struct_size: the QUIC idle timeout that a raw-QUIC picoquic client
offers. A client then notices a relay that vanished within that time,
where the picoquic default waits 30 s. The keepalive runs at half the
timeout, and never slower than the 15 s it uses today. 0, or a caller
built before the field, changes nothing. Any other transport refuses a
non-zero value with MOQ_ERR_UNSUPPORTED, as handshake_timeout_us does.

The keepalive recorder test checks what the adapter receives for 0,
3000, and 60000 ms. The resolve test covers the size gate and the
WebTransport refusal. The ABI layout tests pin the new field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
picoquic also uses the idle timeout as the handshake timeout, and the
derived keepalive of a timeout under 2 ms rounds to 0, which turns it
off. A non-zero idle_timeout_ms under MOQ_ENDPOINT_IDLE_TIMEOUT_MIN_MS
(1000) is therefore MOQ_ERR_INVAL at resolve, on every backend, as the
moqxr CLI and moq2ts bound it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerates docs/bindings.rs with scripts/update_snapshot.sh for
moq_endpoint_cfg_t.idle_timeout_ms: the field, its documentation, the
layout assertions (size 216, offset 208), and the updated initializer
documentation. wrapper.h re-exports MOQ_ENDPOINT_IDLE_TIMEOUT_MIN_MS, as
it does MOQ_ENDPOINT_HANDSHAKE_TIMEOUT_MAX_US, so Rust callers get the
floor. It also carries the session.h paragraph from c3f57a6, which main
has not regenerated yet (the same change as the separate snapshot fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gwendalsimon

Copy link
Copy Markdown
Contributor Author

The new commit also regenerates the Rust bindings snapshot, which main left stale after c3f57a6 (the moq_session_on_data_rcbuf documentation). The Rust Binding workflow should pass with it.

@rwl4
rwl4 merged commit 54a1d96 into main Nov 16, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants