#[unsafe(no_mangle)]pub unsafe extern "C" fn moq_session_stats(
session: u32,
dst: *mut moq_connection_stats,
) -> i32Expand description
Snapshot the current connection statistics for a session.
Fills dst with a point-in-time view of the underlying QUIC/WebTransport connection
(RTT, bandwidth estimates, byte/packet counters). Each metric carries a *_valid flag
since availability depends on the transport backend; see moq_connection_stats.
Returns zero on success, or a negative code on failure: the session handle is unknown, or
the session is currently reconnecting and has no live connection (in which case dst is
left untouched). Safe to call repeatedly to poll stats over the life of the session.
ยงSafety
- The caller must ensure that
dstis a valid pointer to a moq_connection_stats struct.