|
libwebsockets
Lightweight C library for HTML5 websockets
|
Data Structures | |
| struct | lws_conmon |
| union | lws_conmon.protocol_specific |
| struct | lws_conmon.protocol_specific.http |
Typedefs | |
| typedef uint32_t | lws_conmon_interval_us_t |
| typedef enum lws_conmon_pcol | lws_conmon_pcol_t |
| typedef enum lws_conmon_dns_disposition | lws_conmon_dns_disposition_t |
Enumerations | |
| enum | lws_conmon_pcol { LWSCONMON_PCOL_NONE , LWSCONMON_PCOL_HTTP } |
| enum | lws_conmon_dns_disposition { LWSCONMON_DNS_NONE , LWSCONMON_DNS_OK = 1 , LWSCONMON_DNS_SERVER_UNREACHABLE = 2 , LWSCONMON_DNS_NO_RESULT = 3 } |
Functions | |
| LWS_VISIBLE LWS_EXTERN void | lws_conmon_wsi_take (struct lws *wsi, struct lws_conmon *dest) |
| LWS_VISIBLE LWS_EXTERN void | lws_conmon_release (struct lws_conmon *conmon) |
When LWS_WITH_CONMON is enabled at build, collects detailed statistics about the client connection setup latency, available to the connection itself
| struct lws_conmon.protocol_specific.http |
Definition at line 87 of file lws-conmon.h.
| Data Fields | ||
|---|---|---|
| int | response |
h1 http response code |
| typedef uint32_t lws_conmon_interval_us_t |
#include <lws-conmon.h>
Definition at line 35 of file lws-conmon.h.
| typedef enum lws_conmon_pcol lws_conmon_pcol_t |
#include <lws-conmon.h>
| typedef enum lws_conmon_dns_disposition lws_conmon_dns_disposition_t |
#include <lws-conmon.h>
| enum lws_conmon_pcol |
#include <lws-conmon.h>
| Enumerator | |
|---|---|
| LWSCONMON_PCOL_NONE | |
| LWSCONMON_PCOL_HTTP | |
Definition at line 65 of file lws-conmon.h.
#include <lws-conmon.h>
Definition at line 70 of file lws-conmon.h.
| LWS_VISIBLE LWS_EXTERN void lws_conmon_wsi_take | ( | struct lws * | wsi, |
| struct lws_conmon * | dest ) |
#include <lws-conmon.h>
lws_conmon_wsi_take() - create a connection latency object from client wsi
| context | lws wsi |
| dest | conmon struct to fill |
Copies wsi conmon data into the caller's struct. Passes ownership of any allocations in the addrinfo list to the caller, lws will not delete that any more on wsi close after this call. The caller must call lws_conmon_release() on the struct to destroy any addrinfo in the struct that is prepared by this eventually but it can defer it as long as it wants.
Other than the addrinfo list, the contents of the returned object are completely selfcontained and don't point outside of the object itself, ie, everything else in there remains in scope while the object itself does.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_conmon_release | ( | struct lws_conmon * | conmon | ) |
#include <lws-conmon.h>
lws_conmon_release() - free any allocations in the conmon struct
| conmon | pointer to conmon struct |
Destroys any allocations in the conmon struct so it can go out of scope. It doesn't free dest itself, it's designed to clean out a struct that is on the stack or embedded in another object.