Skip to main content

pamoja_coap_client_new

Function pamoja_coap_client_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_coap_client_new( config: *const PamojaCoapConfig, ) -> *mut PamojaCoapClient
Expand description

Creates a disconnected CoAP endpoint from the given settings.

§Arguments

  • config - the endpoint settings.

§Returns

A handle the caller must release with pamoja_coap_client_free, or null on failure with the reason available from pamoja_last_error_message.

§Safety

config must point to a valid PamojaCoapConfig whose strings are valid null-terminated UTF-8 for the duration of the call.