Skip to main content

pamoja_coap_client_subscribe

Function pamoja_coap_client_subscribe 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_coap_client_subscribe( client: *mut PamojaCoapClient, topic: *const c_char, ) -> PamojaStatus
Expand description

Observes a resource path, so messages published to it arrive at pamoja_coap_client_recv.

§Arguments

  • client - the endpoint.
  • topic - the resource path, as null-terminated UTF-8.

§Returns

PamojaStatus::Ok once observing.

§Safety

client must be a live handle and topic a valid null-terminated UTF-8 string.