Skip to main content

pamoja_event_bus_next

Function pamoja_event_bus_next 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_event_bus_next( bus: *const PamojaEventBus, out_event: *mut *mut PamojaBuffer, ) -> PamojaStatus
Expand description

Waits for the next event on this endpoint.

The endpoint holds a publisher of its own, so the bus stays open while it exists and the call waits until an event arrives. Two calls on one endpoint take turns.

§Arguments

  • bus - the endpoint to receive on.
  • out_event - receives a buffer handle the caller must release with pamoja_buffer_free.

§Returns

PamojaStatus::Ok on success.

§Safety

bus must be a live handle and out_event must be writable.