#[unsafe(no_mangle)]pub unsafe extern "C" fn moq_client_connect(
url: *const c_char,
url_len: usize,
client: u32,
origin_publish: u32,
origin_consume: u32,
on_status: Option<extern "C" fn(user_data: *mut c_void, code: i32)>,
user_data: *mut c_void,
) -> i32Expand description
Start establishing a connection to a MoQ server using a client configuration.
Identical to moq_session_connect but dials with the settings on client (created
by moq_client_create) instead of the defaults. The config is cloned, so the handle
stays reusable and editable afterwards. A client of 0 means the defaults, which is
exactly what moq_session_connect does.
Returns a non-zero session handle on success, or a negative code on (immediate)
failure. Close it with moq_session_close. See moq_session_connect for the
on_status contract, which is the same here.
ยงSafety
- The caller must ensure that url is a valid pointer to url_len bytes of data.
- The caller must keep
user_datavalid until the terminal (<= 0)on_statuscallback.