[][src]Function libcoap_sys::coap_endpoint_get_session

pub unsafe extern "C" fn coap_endpoint_get_session(
    endpoint: *mut coap_endpoint_t,
    packet: *const coap_packet_t,
    now: coap_tick_t
) -> *mut coap_session_t

Lookup the server session for the packet received on an endpoint, or create a new one.

@param endpoint Active endpoint the packet was received on. @param packet Received packet. @param now The current time in ticks. @return The CoAP session or @c NULL if error.