|
libwebsockets
Lightweight C library for HTML5 websockets
|
#include <lws-system.h>
Collaboration diagram for lws_system_ops: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 |
Definition at line 171 of file lws-system.h.
| int(* lws_system_ops::reboot) (void) |
Definition at line 172 of file lws-system.h.
| int(* lws_system_ops::set_clock) (lws_usec_t us) |
Definition at line 173 of file lws-system.h.
| 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.
Definition at line 174 of file lws-system.h.
| 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
Definition at line 191 of file lws-system.h.
| 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.
Definition at line 204 of file lws-system.h.
| uint32_t lws_system_ops::wake_latency_us |
time taken for this device to wake from suspend, in us
Definition at line 218 of file lws-system.h.