Skip to main content

pamoja_coap_server_new

Function pamoja_coap_server_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_coap_server_new( bind: *const c_char, ) -> *mut PamojaCoapServer
Expand description

Creates a CoAP server that will listen on a local address.

§Arguments

  • bind - the local host:port, as null-terminated UTF-8, such as 0.0.0.0:5683, or port 0 for a free one.

§Returns

A handle the caller must release with pamoja_coap_server_free, or null if bind is null or not UTF-8.

§Safety

bind must be a valid null-terminated UTF-8 string for the duration of the call, or null.