#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_ladder_recv_within(
ladder: *mut PamojaLadder,
timeout_ms: u64,
out_message: *mut *mut PamojaMessage,
out_timed_out: *mut bool,
) -> PamojaStatusExpand description
Waits a limited time for the next message from any rung that listens.
Running out of time loses nothing: a message that arrives afterwards waits for the next receive.
§Arguments
ladder- the ladder.timeout_ms- how long to wait, in milliseconds.out_message- receives a message handle to release withpamoja_message_free, or null when the time ran out.out_timed_out- receives whether the time ran out before a message arrived.
§Returns
PamojaStatus::Ok with a message or with the time run out, or
PamojaStatus::Closed if no connected rung listens.
§Safety
ladder must be a live handle, and out_message and out_timed_out must be
writable.