#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_coap_client_recv_within(
client: *mut PamojaCoapClient,
timeout_ms: u64,
out_message: *mut *mut PamojaMessage,
out_timed_out: *mut bool,
) -> PamojaStatusExpand description
Waits a limited time for the next message on an observed path.
Running out of time loses nothing: a message that arrives afterwards waits for the next receive.
§Arguments
client- the endpoint.timeout_ms- how long to wait, in milliseconds.out_message- receives a message handle, or null when the time ran out or the endpoint is closed.out_timed_out- receives whether the time ran out before a message arrived.
§Returns
PamojaStatus::Ok with a message, with the time run out, or with null once
the endpoint has closed.
§Safety
client must be a live handle, and out_message and out_timed_out must be
writable.