[][src]Function libcoap_sys::coap_new_client_session_psk

pub unsafe extern "C" fn coap_new_client_session_psk(
    ctx: *mut coap_context_t,
    local_if: *const coap_address_t,
    server: *const coap_address_t,
    proto: coap_proto_t,
    identity: *const c_char,
    key: *const u8,
    key_len: c_uint
) -> *mut coap_session_t

Creates a new client session to the designated server with PSK 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 Protocol. @param identity PSK client identity @param key PSK shared key @param key_len PSK shared key length

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