Skip to main content
Probe is a mechanism for measuring the available bitrate between two peers. The subscriber sends a target bitrate hint to the publisher, and the publisher periodically reports back the bitrate it actually measured on the connection. This enables adaptive bitrate decisions without maintaining a persistent subscription.

moqt.ProbeResult

Both Session.Probe and Session.ProbeTargets deliver results via ProbeResult:
Note: RTT is not included in ProbeResult. Use Session.Stats() or the underlying transport API (e.g. (*quic.Conn).ConnectionStats()) to obtain RTT, bytes sent, and bytes received.

Notify Target Bitrate

Use Session.Probe to send a target bitrate hint to the publisher. The call can be repeated to update the target; the same underlying stream is reused. The returned channel is closed when the session terminates.

Receive Target Bitrate

Use Session.ProbeTargets to receive target bitrate hints sent by the subscriber. The channel has a buffer of 1 and uses latest-value semantics — if the previous value has not been consumed it is replaced by the newer one.
The publisher automatically enforces a single active incoming probe stream; if the subscriber opens a new stream the previous one is cancelled.

Configuring Probe Behaviour

The probe loop timing can be tuned via moqt.Config:

Error Handling

Probe operations may return moqt.ProbeError or moqt.SessionError:
See Built-in Error Codes for ProbeErrorCode values.