Skip to main content

pamoja_loopback_broker_set_reachable

Function pamoja_loopback_broker_set_reachable 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_loopback_broker_set_reachable( broker: *const PamojaLoopbackBroker, reachable: bool, ) -> PamojaStatus
Expand description

Takes a broker out of reach, or brings it back.

Out of reach, every link on the broker fails to connect, send, or subscribe with PamojaStatus::Transport, as an out-of-range radio would, and nothing is delivered. Links keep their connections and filters through the outage, including links a ladder owns, so they carry traffic again once it ends.

§Arguments

  • broker - the broker.
  • reachable - false to take it out of reach, true to bring it back.

§Returns

PamojaStatus::Ok, or PamojaStatus::InvalidArgument if broker is null.

§Safety

broker must be a live handle from pamoja_loopback_broker_new, or null.