#[unsafe(no_mangle)]pub unsafe extern "C" fn moq_session_request_accept(
request: u32,
origin_publish: u32,
origin_consume: u32,
on_status: moq_status_callback,
user_data: *mut c_void,
) -> i32Expand description
Accept a session request, completing the MoQ handshake.
Takes origin handles like moq_session_connect: broadcasts in origin_publish are
announced to the peer, and broadcasts the peer announces land in origin_consume.
An origin handle of 0 disables that direction.
Consumes the request handle on success and returns a non-zero session handle, or a
negative code on failure (leaving the request unanswered). The session works with every
moq_session_* call; stats and bandwidth report offline until the handshake completes.
on_status reports the session lifecycle:
1once the handshake completes. An accepted session is a single connection, so it never reconnects and never reports more.0when closed via moq_session_close (terminal).- a negative error code if the handshake fails or the peer closes the session; read moq_error_protocol for the peer’s close code (terminal).
§Safety
- The caller must keep
user_datavalid until the terminal (<= 0)on_statuscallback.