libwebsockets
Lightweight C library for HTML5 websockets
lws_system_ops Struct Reference

Data Fields

int(* reboot )(void)
 
int(* set_clock )(lws_usec_t us)
 
int(* attach )(struct lws_context *context, int tsi, lws_attach_cb_t cb, lws_system_states_t state, void *opaque, struct lws_attach_item **get)
 
int(* captive_portal_detect_request )(struct lws_context *context)
 
int(* jit_trust_query )(struct lws_context *cx, const uint8_t *skid, size_t skid_len, void *got_opaque)
 
uint32_t wake_latency_us
 

Field Documentation

◆ attach

int(* lws_system_ops::attach) (struct lws_context *context, int tsi, lws_attach_cb_t cb, lws_system_states_t state, void *opaque, struct lws_attach_item **get)

if get is NULL, add an attach callback request to the pt for cb with arg opaque, that should be called when we're at or past system state state.

If get is non-NULL, look for the first listed item on the pt whose state situation is ready, and set *get to point to it. If no items, or none where the system state is right, set *get to NULL.

It's done like this so (*attach) can perform system-specific locking outside of lws core, for both getting and adding items the same so it is thread-safe. A non-threadsafe helper __lws_system_attach() is provided to do the actual work inside the system-specific locking.

◆ captive_portal_detect_request

int(* lws_system_ops::captive_portal_detect_request) (struct lws_context *context)

Check if we can go out on the internet cleanly, or if we are being redirected or intercepted by a captive portal. Start the check that proceeds asynchronously, and report the results by calling lws_captive_portal_detect_result() api

◆ jit_trust_query

int(* lws_system_ops::jit_trust_query) (struct lws_context *cx, const uint8_t *skid, size_t skid_len, void *got_opaque)

user defined trust store search, if we do trust a cert with SKID matching skid / skid_len, then it should get hold of the DER for the matching root CA and call lws_tls_jit_trust_got_cert_cb(..., got_opaque) before cleaning up and returning. The DER should be destroyed if in heap before returning.

◆ wake_latency_us

uint32_t lws_system_ops::wake_latency_us

time taken for this device to wake from suspend, in us


The documentation for this struct was generated from the following file: