[−][src]Struct libcoap_sys::coap_context_t
The CoAP stack's global state is stored in a coap_context_t object.
Fields
known_options: coap_opt_filter_t
resources: *mut coap_resource_t
< hash table or list of known resources
unknown_resource: *mut coap_resource_t
< can be used for handling unknown resources
async_state: *mut coap_async_state_t
list of asynchronous transactions
sendqueue_basetime: coap_tick_t
The time stamp in the first element of the sendqeue is relative to sendqueue_basetime.
sendqueue: *mut coap_queue_t
endpoint: *mut coap_endpoint_t
< the endpoints used for listening
sessions: *mut coap_session_t
< client sessions
response_handler: coap_response_handler_t
nack_handler: coap_nack_handler_t
ping_handler: coap_ping_handler_t
pong_handler: coap_pong_handler_t
handle_event: coap_event_handler_t
Callback function that is used to signal events to the application. This field is set by coap_set_event_handler().
network_send: Option<unsafe extern "C" fn(sock: *mut coap_socket_t, session: *const coap_session_t, data: *const u8, datalen: usize) -> isize>
network_read: Option<unsafe extern "C" fn(sock: *mut coap_socket_t, packet: *mut coap_packet_t) -> isize>
get_client_psk: Option<unsafe extern "C" fn(session: *const coap_session_t, hint: *const u8, hint_len: usize, identity: *mut u8, identity_len: *mut usize, max_identity_len: usize, psk: *mut u8, max_psk_len: usize) -> usize>
get_server_psk: Option<unsafe extern "C" fn(session: *const coap_session_t, identity: *const u8, identity_len: usize, psk: *mut u8, max_psk_len: usize) -> usize>
get_server_hint: Option<unsafe extern "C" fn(session: *const coap_session_t, hint: *mut u8, max_hint_len: usize) -> usize>
dtls_context: *mut c_void
psk_hint: *mut u8
psk_hint_len: usize
psk_key: *mut u8
psk_key_len: usize
session_timeout: c_uint
< Number of seconds of inactivity after which an unused session will be closed. 0 means use default.
max_idle_sessions: c_uint
< Maximum number of simultaneous unused sessions per endpoint. 0 means no maximum.
max_handshake_sessions: c_uint
< Maximum number of simultaneous negotating sessions per endpoint. 0 means use default.
ping_timeout: c_uint
< Minimum inactivity time before sending a ping message. 0 means disabled.
csm_timeout: c_uint
< Timeout for waiting for a CSM from the remote side. 0 means disabled.
app: *mut c_void
< application-specific data
Trait Implementations
impl Clone for coap_context_t
[src]
fn clone(&self) -> coap_context_t
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for coap_context_t
[src]
impl Debug for coap_context_t
[src]
Auto Trait Implementations
impl RefUnwindSafe for coap_context_t
impl !Send for coap_context_t
impl !Sync for coap_context_t
impl Unpin for coap_context_t
impl UnwindSafe for coap_context_t
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,