[][src]Struct libcoap_sys::coap_session_t

#[repr(C)]
pub struct coap_session_t {
    pub proto: coap_proto_t,
    pub type_: coap_session_type_t,
    pub state: coap_session_state_t,
    pub ref_: c_uint,
    pub tls_overhead: c_uint,
    pub mtu: c_uint,
    pub local_if: coap_address_t,
    pub hh: UT_hash_handle,
    pub addr_info: coap_addr_tuple_t,
    pub ifindex: c_int,
    pub sock: coap_socket_t,
    pub endpoint: *mut coap_endpoint_t,
    pub context: *mut coap_context_t,
    pub tls: *mut c_void,
    pub tx_mid: u16,
    pub con_active: u8,
    pub last_ping_mid: coap_tid_t,
    pub delayqueue: *mut coap_queue_t,
    pub partial_write: usize,
    pub read_header: [u8; 8],
    pub partial_read: usize,
    pub partial_pdu: *mut coap_pdu_t,
    pub last_rx_tx: coap_tick_t,
    pub last_tx_rst: coap_tick_t,
    pub last_ping: coap_tick_t,
    pub last_pong: coap_tick_t,
    pub csm_tx: coap_tick_t,
    pub psk_identity: *mut u8,
    pub psk_identity_len: usize,
    pub psk_key: *mut u8,
    pub psk_key_len: usize,
    pub app: *mut c_void,
    pub max_retransmit: c_uint,
    pub ack_timeout: coap_fixed_point_t,
    pub ack_random_factor: coap_fixed_point_t,
    pub dtls_timeout_count: c_uint,
    pub dtls_event: c_int,
}

Fields

proto: coap_proto_t

< protocol used

type_: coap_session_type_t

< client or server side socket

state: coap_session_state_t

< current state of relationaship with peer

ref_: c_uint

< reference count from queues

tls_overhead: c_uint

< overhead of TLS layer

mtu: c_uint

< path or CSM mtu

local_if: coap_address_t

< optional local interface address

hh: UT_hash_handleaddr_info: coap_addr_tuple_t

< key: remote/local address info

ifindex: c_int

< interface index

sock: coap_socket_t

< socket object for the session, if any

endpoint: *mut coap_endpoint_t

< session's endpoint

context: *mut coap_context_t

< session's context

tls: *mut c_void

< security parameters

tx_mid: u16

< the last message id that was used in this session

con_active: u8

< Active CON request sent

last_ping_mid: coap_tid_t

< the last keepalive message id that was used in this session

delayqueue: *mut coap_queue_t

< list of delayed messages waiting to be sent

partial_write: usize

< if > 0 indicates number of bytes already written from the pdu at the head of sendqueue

read_header: [u8; 8]

< storage space for header of incoming message header

partial_read: usize

< if > 0 indicates number of bytes already read for an incoming message

partial_pdu: *mut coap_pdu_t

< incomplete incoming pdu

last_rx_tx: coap_tick_tlast_tx_rst: coap_tick_tlast_ping: coap_tick_tlast_pong: coap_tick_tcsm_tx: coap_tick_tpsk_identity: *mut u8psk_identity_len: usizepsk_key: *mut u8psk_key_len: usizeapp: *mut c_void

< application-specific data

max_retransmit: c_uint

< maximum re-transmit count (default 4)

ack_timeout: coap_fixed_point_t

< timeout waiting for ack (default 2 secs)

ack_random_factor: coap_fixed_point_t

< ack random factor backoff (default 1.5)

dtls_timeout_count: c_uint

< dtls setup retry counter

dtls_event: c_int

< Tracking any (D)TLS events on this sesison

Trait Implementations

impl Clone for coap_session_t[src]

impl Copy for coap_session_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.