[][src]Function libcoap_sys::coap_new_client_session_pki

pub unsafe extern "C" fn coap_new_client_session_pki(
    ctx: *mut coap_context_t,
    local_if: *const coap_address_t,
    server: *const coap_address_t,
    proto: coap_proto_t,
    setup_data: *mut coap_dtls_pki_t
) -> *mut coap_session_t

Creates a new client session to the designated server with PKI credentials @param ctx The CoAP context. @param local_if Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. @param server The server's address. If the port number is zero, the default port for the protocol will be used. @param proto CoAP Protocol. @param setup_data PKI parameters.

@return A new CoAP session or NULL if failed. Call coap_session_release() to free.