![]() |
libwebsockets
Lightweight C library for HTML5 websockets
|
Go to the source code of this file.
Data Structures | |
struct | lws_pollfd |
struct | pollfd |
struct | pollfd |
struct | timer_mapping |
struct | lws_group_member |
struct | lws_esp32 |
struct | lws_esp32_image |
struct | lws_pollargs |
struct | lws_ssl_info |
struct | lws_genhash_ctx |
struct | lws_ext_options |
struct | lws_ext_option_arg |
struct | lws_extension |
struct | lws_protocols |
struct | lws_plugin_capability |
struct | lws_plugin |
struct | lwsgw_hash_bin |
struct | lwsgw_hash |
struct | lws_session_info |
struct | lws_gs_event_args |
struct | lws_context_creation_info |
struct | lws_protocol_vhost_options |
struct | lws_http_mount |
struct | lws_client_connect_info |
struct | lws_process_html_args |
struct | lws_process_html_state |
struct | lws_tokens |
struct | lws_token_limits |
struct | lws_write_passthru |
union | lws_sock_file_fd_type |
struct | lws_cgi_args |
struct | lws_fop_fd |
struct | lws_fops_index |
struct | lws_plat_file_ops |
struct | lws_email |
Typedefs | |
typedef unsigned long long | lws_intptr_t |
typedef SOCKET | lws_sockfd_type |
typedef HANDLE | lws_filefd_type |
typedef os_timer_t | uv_timer_t |
typedef void | uv_cb_t(uv_timer_t *) |
typedef void * | uv_handle_t |
typedef void(* | lws_cb_scan_done) (uint16_t count, wifi_ap_record_t *recs, void *arg) |
typedef unsigned __int32 | uint32_t |
typedef unsigned __int16 | uint16_t |
typedef unsigned __int8 | uint8_t |
typedef unsigned long long | lws_filepos_t |
typedef long long | lws_fileofs_t |
typedef uint32_t | lws_fop_flags_t |
typedef int | lws_callback_function(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len) |
typedef int | lws_extension_callback_function(struct lws_context *context, const struct lws_extension *ext, struct lws *wsi, enum lws_extension_callback_reasons reason, void *user, void *in, size_t len) |
typedef int(* | lws_plugin_init_func) (struct lws_context *, struct lws_plugin_capability *) |
typedef int(* | lws_plugin_destroy_func) (struct lws_context *) |
typedef int(* | lws_reload_func) (void) |
typedef const char *(* | lws_process_html_state_cb) (void *data, int index) |
typedef int(* | lws_spa_fileupload_cb) (void *data, const char *name, const char *filename, char *buf, int len, enum lws_spa_fileupload_states state) |
typedef void() | lws_ev_signal_cb_t(EV_P_ struct ev_signal *w, int revents) |
typedef void() | lws_event_signal_cb_t(evutil_socket_t sock_fd, short revents, void *ctx) |
typedef struct lws_fop_fd * | lws_fop_fd_t |
Enumerations | |
enum | lws_log_levels { LLL_ERR = 1 << 0, LLL_WARN = 1 << 1, LLL_NOTICE = 1 << 2, LLL_INFO = 1 << 3, LLL_DEBUG = 1 << 4, LLL_PARSER = 1 << 5, LLL_HEADER = 1 << 6, LLL_EXT = 1 << 7, LLL_CLIENT = 1 << 8, LLL_LATENCY = 1 << 9, LLL_USER = 1 << 10, LLL_COUNT = 11 } |
enum | genled_state { LWSESP32_GENLED__INIT, LWSESP32_GENLED__LOST_NETWORK, LWSESP32_GENLED__NO_NETWORK, LWSESP32_GENLED__CONN_AP, LWSESP32_GENLED__GOT_IP, LWSESP32_GENLED__OK } |
enum | lws_close_status { LWS_CLOSE_STATUS_NOSTATUS = 0, LWS_CLOSE_STATUS_NORMAL = 1000, LWS_CLOSE_STATUS_GOINGAWAY = 1001, LWS_CLOSE_STATUS_PROTOCOL_ERR = 1002, LWS_CLOSE_STATUS_UNACCEPTABLE_OPCODE = 1003, LWS_CLOSE_STATUS_RESERVED = 1004, LWS_CLOSE_STATUS_NO_STATUS = 1005, LWS_CLOSE_STATUS_ABNORMAL_CLOSE = 1006, LWS_CLOSE_STATUS_INVALID_PAYLOAD = 1007, LWS_CLOSE_STATUS_POLICY_VIOLATION = 1008, LWS_CLOSE_STATUS_MESSAGE_TOO_LARGE = 1009, LWS_CLOSE_STATUS_EXTENSION_REQUIRED = 1010, LWS_CLOSE_STATUS_UNEXPECTED_CONDITION = 1011, LWS_CLOSE_STATUS_TLS_FAILURE = 1015, LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY = 9999 } |
enum | lws_meta_commands { LWS_META_CMD_OPEN_SUBCHANNEL = 'A', LWS_META_CMD_OPEN_RESULT, LWS_META_CMD_CLOSE_NOTIFY, LWS_META_CMD_CLOSE_RQ, LWS_META_CMD_WRITE } |
enum | lws_callback_reasons { LWS_CALLBACK_ESTABLISHED = 0, LWS_CALLBACK_CLIENT_CONNECTION_ERROR = 1, LWS_CALLBACK_CLIENT_FILTER_PRE_ESTABLISH = 2, LWS_CALLBACK_CLIENT_ESTABLISHED = 3, LWS_CALLBACK_CLOSED = 4, LWS_CALLBACK_CLOSED_HTTP = 5, LWS_CALLBACK_RECEIVE = 6, LWS_CALLBACK_RECEIVE_PONG = 7, LWS_CALLBACK_CLIENT_RECEIVE = 8, LWS_CALLBACK_CLIENT_RECEIVE_PONG = 9, LWS_CALLBACK_CLIENT_WRITEABLE = 10, LWS_CALLBACK_SERVER_WRITEABLE = 11, LWS_CALLBACK_HTTP = 12, LWS_CALLBACK_HTTP_BODY = 13, LWS_CALLBACK_HTTP_BODY_COMPLETION = 14, LWS_CALLBACK_HTTP_FILE_COMPLETION = 15, LWS_CALLBACK_HTTP_WRITEABLE = 16, LWS_CALLBACK_FILTER_NETWORK_CONNECTION = 17, LWS_CALLBACK_FILTER_HTTP_CONNECTION = 18, LWS_CALLBACK_SERVER_NEW_CLIENT_INSTANTIATED = 19, LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION = 20, LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS = 21, LWS_CALLBACK_OPENSSL_LOAD_EXTRA_SERVER_VERIFY_CERTS = 22, LWS_CALLBACK_OPENSSL_PERFORM_CLIENT_CERT_VERIFICATION = 23, LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER = 24, LWS_CALLBACK_CONFIRM_EXTENSION_OKAY = 25, LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED = 26, LWS_CALLBACK_PROTOCOL_INIT = 27, LWS_CALLBACK_PROTOCOL_DESTROY = 28, LWS_CALLBACK_WSI_CREATE = 29, LWS_CALLBACK_WSI_DESTROY = 30, LWS_CALLBACK_GET_THREAD_ID = 31, LWS_CALLBACK_ADD_POLL_FD = 32, LWS_CALLBACK_DEL_POLL_FD = 33, LWS_CALLBACK_CHANGE_MODE_POLL_FD = 34, LWS_CALLBACK_LOCK_POLL = 35, LWS_CALLBACK_UNLOCK_POLL = 36, LWS_CALLBACK_OPENSSL_CONTEXT_REQUIRES_PRIVATE_KEY = 37, LWS_CALLBACK_WS_PEER_INITIATED_CLOSE = 38, LWS_CALLBACK_WS_EXT_DEFAULTS = 39, LWS_CALLBACK_CGI = 40, LWS_CALLBACK_CGI_TERMINATED = 41, LWS_CALLBACK_CGI_STDIN_DATA = 42, LWS_CALLBACK_CGI_STDIN_COMPLETED = 43, LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP = 44, LWS_CALLBACK_CLOSED_CLIENT_HTTP = 45, LWS_CALLBACK_RECEIVE_CLIENT_HTTP = 46, LWS_CALLBACK_COMPLETED_CLIENT_HTTP = 47, LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ = 48, LWS_CALLBACK_HTTP_BIND_PROTOCOL = 49, LWS_CALLBACK_HTTP_DROP_PROTOCOL = 50, LWS_CALLBACK_CHECK_ACCESS_RIGHTS = 51, LWS_CALLBACK_PROCESS_HTML = 52, LWS_CALLBACK_ADD_HEADERS = 53, LWS_CALLBACK_SESSION_INFO = 54, LWS_CALLBACK_GS_EVENT = 55, LWS_CALLBACK_HTTP_PMO = 56, LWS_CALLBACK_CLIENT_HTTP_WRITEABLE = 57, LWS_CALLBACK_OPENSSL_PERFORM_SERVER_CERT_VERIFICATION = 58, LWS_CALLBACK_RAW_RX = 59, LWS_CALLBACK_RAW_CLOSE = 60, LWS_CALLBACK_RAW_WRITEABLE = 61, LWS_CALLBACK_RAW_ADOPT = 62, LWS_CALLBACK_RAW_ADOPT_FILE = 63, LWS_CALLBACK_RAW_RX_FILE = 64, LWS_CALLBACK_RAW_WRITEABLE_FILE = 65, LWS_CALLBACK_RAW_CLOSE_FILE = 66, LWS_CALLBACK_SSL_INFO = 67, LWS_CALLBACK_CHILD_WRITE_VIA_PARENT = 68, LWS_CALLBACK_CHILD_CLOSING = 69, LWS_CALLBACK_CGI_PROCESS_ATTACH = 70, LWS_CALLBACK_USER = 1000 } |
enum | lws_extension_callback_reasons { LWS_EXT_CB_SERVER_CONTEXT_CONSTRUCT = 0, LWS_EXT_CB_CLIENT_CONTEXT_CONSTRUCT = 1, LWS_EXT_CB_SERVER_CONTEXT_DESTRUCT = 2, LWS_EXT_CB_CLIENT_CONTEXT_DESTRUCT = 3, LWS_EXT_CB_CONSTRUCT = 4, LWS_EXT_CB_CLIENT_CONSTRUCT = 5, LWS_EXT_CB_CHECK_OK_TO_REALLY_CLOSE = 6, LWS_EXT_CB_CHECK_OK_TO_PROPOSE_EXTENSION = 7, LWS_EXT_CB_DESTROY = 8, LWS_EXT_CB_DESTROY_ANY_WSI_CLOSING = 9, LWS_EXT_CB_ANY_WSI_ESTABLISHED = 10, LWS_EXT_CB_PACKET_RX_PREPARSE = 11, LWS_EXT_CB_PACKET_TX_PRESEND = 12, LWS_EXT_CB_PACKET_TX_DO_SEND = 13, LWS_EXT_CB_HANDSHAKE_REPLY_TX = 14, LWS_EXT_CB_FLUSH_PENDING_TX = 15, LWS_EXT_CB_EXTENDED_PAYLOAD_RX = 16, LWS_EXT_CB_CAN_PROXY_CLIENT_CONNECTION = 17, LWS_EXT_CB_1HZ = 18, LWS_EXT_CB_REQUEST_ON_WRITEABLE = 19, LWS_EXT_CB_IS_WRITEABLE = 20, LWS_EXT_CB_PAYLOAD_TX = 21, LWS_EXT_CB_PAYLOAD_RX = 22, LWS_EXT_CB_OPTION_DEFAULT = 23, LWS_EXT_CB_OPTION_SET = 24, LWS_EXT_CB_OPTION_CONFIRM = 25, LWS_EXT_CB_NAMED_OPTION_SET = 26 } |
enum | lws_ext_options_types { EXTARG_NONE, EXTARG_DEC, EXTARG_OPT_DEC } |
enum | lwsgs_auth_bits { LWSGS_AUTH_LOGGED_IN = 1, LWSGS_AUTH_ADMIN = 2, LWSGS_AUTH_VERIFIED = 4, LWSGS_AUTH_FORGOT_FLOW = 8 } |
enum | lws_gs_event { LWSGSE_CREATED, LWSGSE_DELETED } |
enum | lws_context_options { LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT, LWS_SERVER_OPTION_SKIP_SERVER_CANONICAL_NAME = (1 << 2), LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT, LWS_SERVER_OPTION_LIBEV = (1 << 4), LWS_SERVER_OPTION_DISABLE_IPV6 = (1 << 5), LWS_SERVER_OPTION_DISABLE_OS_CA_CERTS = (1 << 6), LWS_SERVER_OPTION_PEER_CERT_NOT_REQUIRED = (1 << 7), LWS_SERVER_OPTION_VALIDATE_UTF8 = (1 << 8), LWS_SERVER_OPTION_SSL_ECDH, LWS_SERVER_OPTION_LIBUV = (1 << 10), LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS, LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT = (1 << 12), LWS_SERVER_OPTION_EXPLICIT_VHOSTS = (1 << 13), LWS_SERVER_OPTION_UNIX_SOCK = (1 << 14), LWS_SERVER_OPTION_STS = (1 << 15), LWS_SERVER_OPTION_IPV6_V6ONLY_MODIFY = (1 << 16), LWS_SERVER_OPTION_IPV6_V6ONLY_VALUE = (1 << 17), LWS_SERVER_OPTION_UV_NO_SIGSEGV_SIGFPE_SPIN = (1 << 18), LWS_SERVER_OPTION_JUST_USE_RAW_ORIGIN = (1 << 19), LWS_SERVER_OPTION_FALLBACK_TO_RAW = (1 << 20), LWS_SERVER_OPTION_LIBEVENT = (1 << 21), LWS_SERVER_OPTION_ONLY_RAW = (1 << 22), LWS_SERVER_OPTION_ALLOW_LISTEN_SHARE = (1 << 23), LWS_SERVER_OPTION_CREATE_VHOST_SSL_CTX = (1 << 24) } |
enum | lws_mount_protocols { LWSMPRO_HTTP = 0, LWSMPRO_HTTPS = 1, LWSMPRO_FILE = 2, LWSMPRO_CGI = 3, LWSMPRO_REDIR_HTTP = 4, LWSMPRO_REDIR_HTTPS = 5, LWSMPRO_CALLBACK = 6 } |
enum | lws_client_connect_ssl_connection_flags { LCCSCF_USE_SSL = (1 << 0), LCCSCF_ALLOW_SELFSIGNED = (1 << 1), LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK = (1 << 2), LCCSCF_ALLOW_EXPIRED = (1 << 3) } |
enum | http_status { HTTP_STATUS_CONTINUE = 100, HTTP_STATUS_OK = 200, HTTP_STATUS_NO_CONTENT = 204, HTTP_STATUS_PARTIAL_CONTENT = 206, HTTP_STATUS_MOVED_PERMANENTLY = 301, HTTP_STATUS_FOUND = 302, HTTP_STATUS_SEE_OTHER = 303, HTTP_STATUS_NOT_MODIFIED = 304, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_UNAUTHORIZED, HTTP_STATUS_PAYMENT_REQUIRED, HTTP_STATUS_FORBIDDEN, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_METHOD_NOT_ALLOWED, HTTP_STATUS_NOT_ACCEPTABLE, HTTP_STATUS_PROXY_AUTH_REQUIRED, HTTP_STATUS_REQUEST_TIMEOUT, HTTP_STATUS_CONFLICT, HTTP_STATUS_GONE, HTTP_STATUS_LENGTH_REQUIRED, HTTP_STATUS_PRECONDITION_FAILED, HTTP_STATUS_REQ_ENTITY_TOO_LARGE, HTTP_STATUS_REQ_URI_TOO_LONG, HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, HTTP_STATUS_REQ_RANGE_NOT_SATISFIABLE, HTTP_STATUS_EXPECTATION_FAILED, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, HTTP_STATUS_NOT_IMPLEMENTED, HTTP_STATUS_BAD_GATEWAY, HTTP_STATUS_SERVICE_UNAVAILABLE, HTTP_STATUS_GATEWAY_TIMEOUT, HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED } |
enum | lws_token_indexes { WSI_TOKEN_GET_URI = 0, WSI_TOKEN_POST_URI = 1, WSI_TOKEN_OPTIONS_URI = 2, WSI_TOKEN_HOST = 3, WSI_TOKEN_CONNECTION = 4, WSI_TOKEN_UPGRADE = 5, WSI_TOKEN_ORIGIN = 6, WSI_TOKEN_DRAFT = 7, WSI_TOKEN_CHALLENGE = 8, WSI_TOKEN_EXTENSIONS = 9, WSI_TOKEN_KEY1 = 10, WSI_TOKEN_KEY2 = 11, WSI_TOKEN_PROTOCOL = 12, WSI_TOKEN_ACCEPT = 13, WSI_TOKEN_NONCE = 14, WSI_TOKEN_HTTP = 15, WSI_TOKEN_HTTP2_SETTINGS = 16, WSI_TOKEN_HTTP_ACCEPT = 17, WSI_TOKEN_HTTP_AC_REQUEST_HEADERS = 18, WSI_TOKEN_HTTP_IF_MODIFIED_SINCE = 19, WSI_TOKEN_HTTP_IF_NONE_MATCH = 20, WSI_TOKEN_HTTP_ACCEPT_ENCODING = 21, WSI_TOKEN_HTTP_ACCEPT_LANGUAGE = 22, WSI_TOKEN_HTTP_PRAGMA = 23, WSI_TOKEN_HTTP_CACHE_CONTROL = 24, WSI_TOKEN_HTTP_AUTHORIZATION = 25, WSI_TOKEN_HTTP_COOKIE = 26, WSI_TOKEN_HTTP_CONTENT_LENGTH = 27, WSI_TOKEN_HTTP_CONTENT_TYPE = 28, WSI_TOKEN_HTTP_DATE = 29, WSI_TOKEN_HTTP_RANGE = 30, WSI_TOKEN_HTTP_REFERER = 31, WSI_TOKEN_KEY = 32, WSI_TOKEN_VERSION = 33, WSI_TOKEN_SWORIGIN = 34, WSI_TOKEN_HTTP_COLON_AUTHORITY = 35, WSI_TOKEN_HTTP_COLON_METHOD = 36, WSI_TOKEN_HTTP_COLON_PATH = 37, WSI_TOKEN_HTTP_COLON_SCHEME = 38, WSI_TOKEN_HTTP_COLON_STATUS = 39, WSI_TOKEN_HTTP_ACCEPT_CHARSET = 40, WSI_TOKEN_HTTP_ACCEPT_RANGES = 41, WSI_TOKEN_HTTP_ACCESS_CONTROL_ALLOW_ORIGIN = 42, WSI_TOKEN_HTTP_AGE = 43, WSI_TOKEN_HTTP_ALLOW = 44, WSI_TOKEN_HTTP_CONTENT_DISPOSITION = 45, WSI_TOKEN_HTTP_CONTENT_ENCODING = 46, WSI_TOKEN_HTTP_CONTENT_LANGUAGE = 47, WSI_TOKEN_HTTP_CONTENT_LOCATION = 48, WSI_TOKEN_HTTP_CONTENT_RANGE = 49, WSI_TOKEN_HTTP_ETAG = 50, WSI_TOKEN_HTTP_EXPECT = 51, WSI_TOKEN_HTTP_EXPIRES = 52, WSI_TOKEN_HTTP_FROM = 53, WSI_TOKEN_HTTP_IF_MATCH = 54, WSI_TOKEN_HTTP_IF_RANGE = 55, WSI_TOKEN_HTTP_IF_UNMODIFIED_SINCE = 56, WSI_TOKEN_HTTP_LAST_MODIFIED = 57, WSI_TOKEN_HTTP_LINK = 58, WSI_TOKEN_HTTP_LOCATION = 59, WSI_TOKEN_HTTP_MAX_FORWARDS = 60, WSI_TOKEN_HTTP_PROXY_AUTHENTICATE = 61, WSI_TOKEN_HTTP_PROXY_AUTHORIZATION = 62, WSI_TOKEN_HTTP_REFRESH = 63, WSI_TOKEN_HTTP_RETRY_AFTER = 64, WSI_TOKEN_HTTP_SERVER = 65, WSI_TOKEN_HTTP_SET_COOKIE = 66, WSI_TOKEN_HTTP_STRICT_TRANSPORT_SECURITY = 67, WSI_TOKEN_HTTP_TRANSFER_ENCODING = 68, WSI_TOKEN_HTTP_USER_AGENT = 69, WSI_TOKEN_HTTP_VARY = 70, WSI_TOKEN_HTTP_VIA = 71, WSI_TOKEN_HTTP_WWW_AUTHENTICATE = 72, WSI_TOKEN_PATCH_URI = 73, WSI_TOKEN_PUT_URI = 74, WSI_TOKEN_DELETE_URI = 75, WSI_TOKEN_HTTP_URI_ARGS = 76, WSI_TOKEN_PROXY = 77, WSI_TOKEN_HTTP_X_REAL_IP = 78, WSI_TOKEN_HTTP1_0 = 79, WSI_TOKEN_X_FORWARDED_FOR = 80, WSI_TOKEN_CONNECT = 81, WSI_TOKEN_HEAD_URI = 82, WSI_TOKEN_TE = 83, _WSI_TOKEN_CLIENT_SENT_PROTOCOLS, _WSI_TOKEN_CLIENT_PEER_ADDRESS, _WSI_TOKEN_CLIENT_URI, _WSI_TOKEN_CLIENT_HOST, _WSI_TOKEN_CLIENT_ORIGIN, _WSI_TOKEN_CLIENT_METHOD, _WSI_TOKEN_CLIENT_IFACE, WSI_TOKEN_COUNT, WSI_TOKEN_NAME_PART, WSI_TOKEN_SKIPPING, WSI_TOKEN_SKIPPING_SAW_CR, WSI_PARSING_COMPLETE, WSI_INIT_TOKEN_MUXURL } |
enum | lws_spa_fileupload_states { LWS_UFS_CONTENT, LWS_UFS_FINAL_CONTENT, LWS_UFS_OPEN } |
enum | pending_timeout { NO_PENDING_TIMEOUT = 0, PENDING_TIMEOUT_AWAITING_PROXY_RESPONSE = 1, PENDING_TIMEOUT_AWAITING_CONNECT_RESPONSE = 2, PENDING_TIMEOUT_ESTABLISH_WITH_SERVER = 3, PENDING_TIMEOUT_AWAITING_SERVER_RESPONSE = 4, PENDING_TIMEOUT_AWAITING_PING = 5, PENDING_TIMEOUT_CLOSE_ACK = 6, PENDING_TIMEOUT_AWAITING_EXTENSION_CONNECT_RESPONSE = 7, PENDING_TIMEOUT_SENT_CLIENT_HANDSHAKE = 8, PENDING_TIMEOUT_SSL_ACCEPT = 9, PENDING_TIMEOUT_HTTP_CONTENT = 10, PENDING_TIMEOUT_AWAITING_CLIENT_HS_SEND = 11, PENDING_FLUSH_STORED_SEND_BEFORE_CLOSE = 12, PENDING_TIMEOUT_SHUTDOWN_FLUSH = 13, PENDING_TIMEOUT_CGI = 14, PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE = 15, PENDING_TIMEOUT_WS_PONG_CHECK_SEND_PING = 16, PENDING_TIMEOUT_WS_PONG_CHECK_GET_PONG = 17, PENDING_TIMEOUT_CLIENT_ISSUE_PAYLOAD = 18, PENDING_TIMEOUT_AWAITING_SOCKS_GREETING_REPLY = 19, PENDING_TIMEOUT_AWAITING_SOCKS_CONNECT_REPLY = 20, PENDING_TIMEOUT_AWAITING_SOCKS_AUTH_REPLY = 21, PENDING_TIMEOUT_KILLED_BY_SSL_INFO = 22, PENDING_TIMEOUT_KILLED_BY_PARENT = 23, PENDING_TIMEOUT_CLOSE_SEND = 24, PENDING_TIMEOUT_HOLDING_AH = 25, PENDING_TIMEOUT_USER_REASON_BASE = 1000 } |
enum | lws_write_protocol { LWS_WRITE_TEXT = 0, LWS_WRITE_BINARY = 1, LWS_WRITE_CONTINUATION = 2, LWS_WRITE_HTTP = 3, LWS_WRITE_PING = 5, LWS_WRITE_PONG = 6, LWS_WRITE_HTTP_FINAL = 7, LWS_WRITE_HTTP_HEADERS = 8, LWS_WRITE_HTTP_HEADERS_CONTINUATION = 9, LWS_WRITE_NO_FIN = 0x40, LWS_WRITE_H2_STREAM_END = 0x80, LWS_WRITE_CLIENT_IGNORE_XOR_MASK = 0x80 } |
enum | { LWS_RXFLOW_REASON_USER_BOOL = (1 << 0), LWS_RXFLOW_REASON_HTTP_RXBUFFER = (1 << 6), LWS_RXFLOW_REASON_H2_PPS_PENDING = (1 << 7), LWS_RXFLOW_REASON_APPLIES = (1 << 14), LWS_RXFLOW_REASON_APPLIES_ENABLE_BIT = (1 << 13), LWS_RXFLOW_REASON_APPLIES_ENABLE, LWS_RXFLOW_REASON_APPLIES_DISABLE = LWS_RXFLOW_REASON_APPLIES, LWS_RXFLOW_REASON_FLAG_PROCESS_NOW = (1 << 12) } |
enum | lws_adoption_type { LWS_ADOPT_RAW_FILE_DESC = 0, LWS_ADOPT_HTTP = 1, LWS_ADOPT_SOCKET = 2, LWS_ADOPT_ALLOW_SSL = 4, LWS_ADOPT_WS_PARENTIO = 8 } |
enum | lws_enum_stdinouterr { LWS_STDIN = 0, LWS_STDOUT = 1, LWS_STDERR = 2 } |
enum | lws_cgi_hdr_state { LCHS_HEADER, LCHS_CR1, LCHS_LF1, LCHS_CR2, LCHS_LF2, LHCS_RESPONSE, LHCS_DUMP_HEADERS, LHCS_PAYLOAD, LCHS_SINGLE_0A } |
enum | lwsgs_smtp_states { LGSSMTP_IDLE, LGSSMTP_CONNECTING, LGSSMTP_CONNECTED, LGSSMTP_SENT_HELO, LGSSMTP_SENT_FROM, LGSSMTP_SENT_TO, LGSSMTP_SENT_DATA, LGSSMTP_SENT_BODY, LGSSMTP_SENT_QUIT } |
enum | { LWSSTATS_C_CONNECTIONS, LWSSTATS_C_API_CLOSE, LWSSTATS_C_API_READ, LWSSTATS_C_API_LWS_WRITE, LWSSTATS_C_API_WRITE, LWSSTATS_C_WRITE_PARTIALS, LWSSTATS_C_WRITEABLE_CB_REQ, LWSSTATS_C_WRITEABLE_CB_EFF_REQ, LWSSTATS_C_WRITEABLE_CB, LWSSTATS_C_SSL_CONNECTIONS_FAILED, LWSSTATS_C_SSL_CONNECTIONS_ACCEPTED, LWSSTATS_C_SSL_CONNECTIONS_ACCEPT_SPIN, LWSSTATS_C_SSL_CONNS_HAD_RX, LWSSTATS_C_TIMEOUTS, LWSSTATS_C_SERVICE_ENTRY, LWSSTATS_B_READ, LWSSTATS_B_WRITE, LWSSTATS_B_PARTIALS_ACCEPTED_PARTS, LWSSTATS_MS_SSL_CONNECTIONS_ACCEPTED_DELAY, LWSSTATS_MS_WRITABLE_DELAY, LWSSTATS_MS_WORST_WRITABLE_DELAY, LWSSTATS_MS_SSL_RX_DELAY, LWSSTATS_C_PEER_LIMIT_AH_DENIED, LWSSTATS_C_PEER_LIMIT_WSI_DENIED, LWSSTATS_SIZE } |
Functions | |
LWS_VISIBLE LWS_EXTERN void | _lws_log (int filter, const char *format,...) LWS_FORMAT(2) |
LWS_VISIBLE LWS_EXTERN void | _lws_logv (int filter, const char *format, va_list vl) |
LWS_VISIBLE LWS_EXTERN int | lwsl_timestamp (int level, char *p, int len) |
LWS_VISIBLE LWS_EXTERN void | lwsl_hexdump_level (int level, const void *vbuf, size_t len) |
LWS_VISIBLE LWS_EXTERN void | lwsl_hexdump (const void *buf, size_t len) |
LWS_VISIBLE LWS_EXTERN void | lws_set_log_level (int level, void(*log_emit_function)(int level, const char *line)) |
LWS_VISIBLE LWS_EXTERN void | lwsl_emit_syslog (int level, const char *line) |
LWS_VISIBLE LWS_EXTERN int | lwsl_visible (int level) |
lws_sockfd_type | esp8266_create_tcp_listen_socket (struct lws_vhost *vh) |
void | esp8266_tcp_stream_accept (lws_sockfd_type fd, struct lws *wsi) |
int | ets_snprintf (char *str, size_t size, const char *format,...) LWS_FORMAT(3) |
void | os_timer_disarm (void *) |
void | os_timer_setfn (os_timer_t *, os_timer_func_t *, void *) |
void | ets_timer_arm_new (os_timer_t *, int, int, int) |
void | esp32_uvtimer_cb (TimerHandle_t t) |
void | lws_esp32_identify_physical_device (void) |
esp_err_t | lws_esp32_event_passthru (void *ctx, system_event_t *event) |
void | lws_esp32_wlan_config (void) |
void | lws_esp32_wlan_start_ap (void) |
void | lws_esp32_wlan_start_station (void) |
void | lws_esp32_set_creation_defaults (struct lws_context_creation_info *info) |
struct lws_context * | lws_esp32_init (struct lws_context_creation_info *, struct lws_vhost **pvh) |
int | lws_esp32_wlan_nvs_get (int retry) |
esp_err_t | lws_nvs_set_str (nvs_handle handle, const char *key, const char *value) |
void | lws_esp32_restart_guided (uint32_t type) |
const esp_partition_t * | lws_esp_ota_get_boot_partition (void) |
int | lws_esp32_get_image_info (const esp_partition_t *part, struct lws_esp32_image *i, char *json, int json_len) |
int | lws_esp32_leds_network_indication (void) |
uint32_t | lws_esp32_get_reboot_type (void) |
uint16_t | lws_esp32_sine_interp (int n) |
void | lws_esp32_leds_timer_cb (TimerHandle_t th) |
LWS_VISIBLE LWS_EXTERN void | lws_close_reason (struct lws *wsi, enum lws_close_status status, unsigned char *buf, size_t len) |
LWS_VISIBLE LWS_EXTERN size_t LWS_WARN_UNUSED_RESULT | lws_genhash_size (int type) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_genhash_init (struct lws_genhash_ctx *ctx, int type) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_genhash_update (struct lws_genhash_ctx *ctx, const void *in, size_t len) |
LWS_VISIBLE LWS_EXTERN int | lws_genhash_destroy (struct lws_genhash_ctx *ctx, void *result) |
LWS_VISIBLE LWS_EXTERN int | lws_set_extension_option (struct lws *wsi, const char *ext_name, const char *opt_name, const char *opt_val) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_ext_parse_options (const struct lws_extension *ext, struct lws *wsi, void *ext_user, const struct lws_ext_options *opts, const char *o, int len) |
LWS_EXTERN int | lws_extension_callback_pm_deflate (struct lws_context *context, const struct lws_extension *ext, struct lws *wsi, enum lws_extension_callback_reasons reason, void *user, void *in, size_t len) |
LWS_VISIBLE LWS_EXTERN const struct lws_protocols * | lws_vhost_name_to_protocol (struct lws_vhost *vh, const char *name) |
LWS_VISIBLE LWS_EXTERN const struct lws_protocols * | lws_get_protocol (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN const struct lws_protocols * | lws_protocol_get (struct lws *wsi) LWS_WARN_DEPRECATED |
LWS_VISIBLE LWS_EXTERN void * | lws_protocol_vh_priv_zalloc (struct lws_vhost *vhost, const struct lws_protocols *prot, int size) |
LWS_VISIBLE LWS_EXTERN void * | lws_protocol_vh_priv_get (struct lws_vhost *vhost, const struct lws_protocols *prot) |
LWS_VISIBLE LWS_EXTERN void * | lws_adjust_protocol_psds (struct lws *wsi, size_t new_size) |
LWS_VISIBLE LWS_EXTERN int | lws_finalize_startup (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN int | lws_protocol_init (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN struct lws_context * | lws_create_context (struct lws_context_creation_info *info) |
LWS_VISIBLE LWS_EXTERN void | lws_context_destroy (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN void | lws_context_destroy2 (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN void | lws_context_deprecate (struct lws_context *context, lws_reload_func cb) |
LWS_VISIBLE LWS_EXTERN int | lws_context_is_deprecated (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN int | lws_set_proxy (struct lws_vhost *vhost, const char *proxy) |
LWS_VISIBLE LWS_EXTERN int | lws_set_socks (struct lws_vhost *vhost, const char *socks) |
LWS_VISIBLE LWS_EXTERN struct lws_vhost * | lws_create_vhost (struct lws_context *context, struct lws_context_creation_info *info) |
LWS_VISIBLE LWS_EXTERN void | lws_vhost_destroy (struct lws_vhost *vh) |
LWS_VISIBLE LWS_EXTERN int | lwsws_get_config_globals (struct lws_context_creation_info *info, const char *d, char **config_strings, int *len) |
LWS_VISIBLE LWS_EXTERN int | lwsws_get_config_vhosts (struct lws_context *context, struct lws_context_creation_info *info, const char *d, char **config_strings, int *len) |
LWS_VISIBLE LWS_EXTERN struct lws_vhost * | lws_vhost_get (struct lws *wsi) LWS_WARN_DEPRECATED |
LWS_VISIBLE LWS_EXTERN struct lws_vhost * | lws_get_vhost (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_json_dump_vhost (const struct lws_vhost *vh, char *buf, int len) |
LWS_VISIBLE LWS_EXTERN int | lws_json_dump_context (const struct lws_context *context, char *buf, int len, int hide_vhosts) |
LWS_VISIBLE LWS_EXTERN void * | lws_vhost_user (struct lws_vhost *vhost) |
LWS_VISIBLE LWS_EXTERN void * | lws_context_user (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN struct lws * | lws_client_connect_via_info (struct lws_client_connect_info *ccinfo) |
LWS_VISIBLE LWS_EXTERN struct lws *LWS_WARN_UNUSED_RESULT | lws_client_connect (struct lws_context *clients, const char *address, int port, int ssl_connection, const char *path, const char *host, const char *origin, const char *protocol, int ietf_version_or_minus_one) LWS_WARN_DEPRECATED |
LWS_VISIBLE LWS_EXTERN struct lws *LWS_WARN_UNUSED_RESULT | lws_client_connect_extended (struct lws_context *clients, const char *address, int port, int ssl_connection, const char *path, const char *host, const char *origin, const char *protocol, int ietf_version_or_minus_one, void *userdata) LWS_WARN_DEPRECATED |
LWS_VISIBLE LWS_EXTERN int | lws_init_vhost_client_ssl (const struct lws_context_creation_info *info, struct lws_vhost *vhost) |
LWS_VISIBLE LWS_EXTERN int | lws_http_client_read (struct lws *wsi, char **buf, int *len) |
LWS_VISIBLE LWS_EXTERN unsigned int | lws_http_client_http_response (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN void | lws_client_http_body_pending (struct lws *wsi, int something_left_to_send) |
LWS_VISIBLE LWS_EXTERN int | lws_service (struct lws_context *context, int timeout_ms) |
LWS_VISIBLE LWS_EXTERN int | lws_service_tsi (struct lws_context *context, int timeout_ms, int tsi) |
LWS_VISIBLE LWS_EXTERN void | lws_cancel_service_pt (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN void | lws_cancel_service (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN int | lws_service_fd (struct lws_context *context, struct lws_pollfd *pollfd) |
LWS_VISIBLE LWS_EXTERN int | lws_service_fd_tsi (struct lws_context *context, struct lws_pollfd *pollfd, int tsi) |
LWS_VISIBLE LWS_EXTERN int | lws_service_adjust_timeout (struct lws_context *context, int timeout_ms, int tsi) |
LWS_VISIBLE LWS_EXTERN int | lws_handle_POLLOUT_event (struct lws *wsi, struct lws_pollfd *pollfd) |
LWS_VISIBLE LWS_EXTERN const char * | lws_get_mimetype (const char *file, const struct lws_http_mount *m) |
LWS_VISIBLE LWS_EXTERN int | lws_serve_http_file (struct lws *wsi, const char *file, const char *content_type, const char *other_headers, int other_headers_len) |
LWS_VISIBLE LWS_EXTERN int | lws_serve_http_file_fragment (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_chunked_html_process (struct lws_process_html_args *args, struct lws_process_html_state *s) |
LWS_VISIBLE LWS_EXTERN const unsigned char * | lws_token_to_string (enum lws_token_indexes token) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_hdr_total_length (struct lws *wsi, enum lws_token_indexes h) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_hdr_fragment_length (struct lws *wsi, enum lws_token_indexes h, int frag_idx) |
LWS_VISIBLE LWS_EXTERN int | lws_hdr_copy (struct lws *wsi, char *dest, int len, enum lws_token_indexes h) |
LWS_VISIBLE LWS_EXTERN int | lws_hdr_copy_fragment (struct lws *wsi, char *dest, int len, enum lws_token_indexes h, int frag_idx) |
LWS_VISIBLE LWS_EXTERN const char * | lws_get_urlarg_by_name (struct lws *wsi, const char *name, char *buf, int len) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_add_http_header_status (struct lws *wsi, unsigned int code, unsigned char **p, unsigned char *end) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_add_http_header_by_name (struct lws *wsi, const unsigned char *name, const unsigned char *value, int length, unsigned char **p, unsigned char *end) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_add_http_header_by_token (struct lws *wsi, enum lws_token_indexes token, const unsigned char *value, int length, unsigned char **p, unsigned char *end) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_add_http_header_content_length (struct lws *wsi, lws_filepos_t content_length, unsigned char **p, unsigned char *end) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_finalize_http_header (struct lws *wsi, unsigned char **p, unsigned char *end) |
LWS_VISIBLE LWS_EXTERN struct lws_spa * | lws_spa_create (struct lws *wsi, const char *const *param_names, int count_params, int max_storage, lws_spa_fileupload_cb opt_cb, void *opt_data) |
LWS_VISIBLE LWS_EXTERN int | lws_spa_process (struct lws_spa *spa, const char *in, int len) |
LWS_VISIBLE LWS_EXTERN int | lws_spa_finalize (struct lws_spa *spa) |
LWS_VISIBLE LWS_EXTERN int | lws_spa_get_length (struct lws_spa *spa, int n) |
LWS_VISIBLE LWS_EXTERN const char * | lws_spa_get_string (struct lws_spa *spa, int n) |
LWS_VISIBLE LWS_EXTERN int | lws_spa_destroy (struct lws_spa *spa) |
LWS_VISIBLE LWS_EXTERN const char * | lws_urlencode (char *escaped, const char *string, int len) |
LWS_VISIBLE LWS_EXTERN int | lws_urldecode (char *string, const char *escaped, int len) |
LWS_VISIBLE LWS_EXTERN int | lws_return_http_status (struct lws *wsi, unsigned int code, const char *html_body) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_http_redirect (struct lws *wsi, int code, const unsigned char *loc, int len, unsigned char **p, unsigned char *end) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_http_transaction_completed (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN const char * | lws_sql_purify (char *escaped, const char *string, int len) |
LWS_VISIBLE LWS_EXTERN const char * | lws_json_purify (char *escaped, const char *string, int len) |
LWS_VISIBLE LWS_EXTERN int | lws_ev_sigint_cfg (struct lws_context *context, int use_ev_sigint, lws_ev_signal_cb_t *cb) |
LWS_VISIBLE LWS_EXTERN int | lws_ev_initloop (struct lws_context *context, struct ev_loop *loop, int tsi) |
LWS_VISIBLE LWS_EXTERN void | lws_ev_sigint_cb (struct ev_loop *loop, struct ev_signal *watcher, int revents) |
LWS_VISIBLE LWS_EXTERN int | lws_uv_sigint_cfg (struct lws_context *context, int use_uv_sigint, uv_signal_cb cb) |
LWS_VISIBLE LWS_EXTERN void | lws_libuv_run (const struct lws_context *context, int tsi) |
LWS_VISIBLE LWS_EXTERN void | lws_libuv_stop (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN void | lws_libuv_stop_without_kill (const struct lws_context *context, int tsi) |
LWS_VISIBLE LWS_EXTERN int | lws_uv_initloop (struct lws_context *context, uv_loop_t *loop, int tsi) |
LWS_VISIBLE LWS_EXTERN uv_loop_t * | lws_uv_getloop (struct lws_context *context, int tsi) |
LWS_VISIBLE LWS_EXTERN void | lws_uv_sigint_cb (uv_signal_t *watcher, int signum) |
LWS_VISIBLE LWS_EXTERN void | lws_close_all_handles_in_loop (uv_loop_t *loop) |
LWS_VISIBLE LWS_EXTERN int | lws_event_sigint_cfg (struct lws_context *context, int use_event_sigint, lws_event_signal_cb_t cb) |
LWS_VISIBLE LWS_EXTERN int | lws_event_initloop (struct lws_context *context, struct event_base *loop, int tsi) |
LWS_VISIBLE LWS_EXTERN void | lws_event_sigint_cb (evutil_socket_t sock_fd, short revents, void *ctx) |
LWS_VISIBLE LWS_EXTERN void | lws_set_timeout (struct lws *wsi, enum pending_timeout reason, int secs) |
LWS_VISIBLE LWS_EXTERN int | lws_write (struct lws *wsi, unsigned char *buf, size_t len, enum lws_write_protocol protocol) |
LWS_VISIBLE LWS_EXTERN int | lws_callback_on_writable (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_callback_on_writable_all_protocol (const struct lws_context *context, const struct lws_protocols *protocol) |
LWS_VISIBLE LWS_EXTERN int | lws_callback_on_writable_all_protocol_vhost (const struct lws_vhost *vhost, const struct lws_protocols *protocol) |
LWS_VISIBLE LWS_EXTERN int | lws_callback_all_protocol (struct lws_context *context, const struct lws_protocols *protocol, int reason) |
LWS_VISIBLE LWS_EXTERN int | lws_callback_all_protocol_vhost (struct lws_vhost *vh, const struct lws_protocols *protocol, int reason) LWS_WARN_DEPRECATED |
LWS_VISIBLE int | lws_callback_all_protocol_vhost_args (struct lws_vhost *vh, const struct lws_protocols *protocol, int reason, void *argp, size_t len) |
LWS_VISIBLE LWS_EXTERN int | lws_callback_vhost_protocols (struct lws *wsi, int reason, void *in, int len) |
LWS_VISIBLE LWS_EXTERN int | lws_callback_http_dummy (struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len) |
LWS_VISIBLE LWS_EXTERN int | lws_get_socket_fd (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN size_t | lws_get_peer_write_allowance (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_rx_flow_control (struct lws *wsi, int enable) |
LWS_VISIBLE LWS_EXTERN void | lws_rx_flow_allow_all_protocol (const struct lws_context *context, const struct lws_protocols *protocol) |
LWS_VISIBLE LWS_EXTERN size_t | lws_remaining_packet_payload (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN struct lws * | lws_adopt_socket (struct lws_context *context, lws_sockfd_type accept_fd) |
LWS_VISIBLE LWS_EXTERN struct lws * | lws_adopt_socket_vhost (struct lws_vhost *vh, lws_sockfd_type accept_fd) |
LWS_VISIBLE LWS_EXTERN struct lws * | lws_adopt_descriptor_vhost (struct lws_vhost *vh, lws_adoption_type type, lws_sock_file_fd_type fd, const char *vh_prot_name, struct lws *parent) |
LWS_VISIBLE LWS_EXTERN struct lws * | lws_adopt_socket_readbuf (struct lws_context *context, lws_sockfd_type accept_fd, const char *readbuf, size_t len) |
LWS_VISIBLE LWS_EXTERN struct lws * | lws_adopt_socket_vhost_readbuf (struct lws_vhost *vhost, lws_sockfd_type accept_fd, const char *readbuf, size_t len) |
LWS_VISIBLE LWS_EXTERN const char *LWS_WARN_UNUSED_RESULT | lws_canonical_hostname (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN void | lws_get_peer_addresses (struct lws *wsi, lws_sockfd_type fd, char *name, int name_len, char *rip, int rip_len) |
LWS_VISIBLE LWS_EXTERN const char * | lws_get_peer_simple (struct lws *wsi, char *name, int namelen) |
LWS_VISIBLE LWS_EXTERN int | lws_interface_to_sa (int ipv6, const char *ifname, struct sockaddr_in *addr, size_t addrlen) |
LWS_VISIBLE LWS_EXTERN int | lws_snprintf (char *str, size_t size, const char *format,...) LWS_FORMAT(3) |
LWS_VISIBLE LWS_EXTERN int | lws_get_random (struct lws_context *context, void *buf, int len) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_daemonize (const char *_lock_path) |
LWS_VISIBLE LWS_EXTERN const char *LWS_WARN_UNUSED_RESULT | lws_get_library_version (void) |
LWS_VISIBLE LWS_EXTERN void * | lws_wsi_user (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN void | lws_set_wsi_user (struct lws *wsi, void *user) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_parse_uri (char *p, const char **prot, const char **ads, int *port, const char **path) |
LWS_VISIBLE LWS_EXTERN unsigned long | lws_now_secs (void) |
LWS_VISIBLE LWS_EXTERN struct lws_context *LWS_WARN_UNUSED_RESULT | lws_get_context (const struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_get_count_threads (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN struct lws *LWS_WARN_UNUSED_RESULT | lws_get_parent (const struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN struct lws *LWS_WARN_UNUSED_RESULT | lws_get_child (const struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN void | lws_set_parent_carries_io (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN void * | lws_get_opaque_parent_data (const struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN void | lws_set_opaque_parent_data (struct lws *wsi, void *data) |
LWS_VISIBLE LWS_EXTERN int | lws_get_child_pending_on_writable (const struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN void | lws_clear_child_pending_on_writable (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_get_close_length (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN unsigned char * | lws_get_close_payload (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN struct lws * | lws_get_network_wsi (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_read (struct lws *wsi, unsigned char *buf, lws_filepos_t len) |
LWS_VISIBLE LWS_EXTERN void | lws_set_allocator (void *(*realloc)(void *ptr, size_t size, const char *reason)) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_send_pipe_choked (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_is_final_fragment (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_is_first_fragment (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN unsigned char | lws_get_reserved_bits (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_partial_buffered (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT | lws_frame_is_binary (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_is_ssl (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_is_cgi (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN SSL * | lws_get_ssl (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN struct lws_ring * | lws_ring_create (size_t element_len, size_t count, void(*destroy_element)(void *element)) |
LWS_VISIBLE LWS_EXTERN void | lws_ring_destroy (struct lws_ring *ring) |
LWS_VISIBLE LWS_EXTERN size_t | lws_ring_get_count_free_elements (struct lws_ring *ring) |
LWS_VISIBLE LWS_EXTERN size_t | lws_ring_get_count_waiting_elements (struct lws_ring *ring, uint32_t *tail) |
LWS_VISIBLE LWS_EXTERN size_t | lws_ring_insert (struct lws_ring *ring, const void *src, size_t max_count) |
LWS_VISIBLE LWS_EXTERN size_t | lws_ring_consume (struct lws_ring *ring, uint32_t *tail, void *dest, size_t max_count) |
LWS_VISIBLE LWS_EXTERN const void * | lws_ring_get_element (struct lws_ring *ring, uint32_t *tail) |
LWS_VISIBLE LWS_EXTERN void | lws_ring_update_oldest_tail (struct lws_ring *ring, uint32_t tail) |
LWS_VISIBLE LWS_EXTERN uint32_t | lws_ring_get_oldest_tail (struct lws_ring *ring) |
LWS_VISIBLE LWS_EXTERN int | lws_ring_next_linear_insert_range (struct lws_ring *ring, void **start, size_t *bytes) |
LWS_VISIBLE LWS_EXTERN void | lws_ring_bump_head (struct lws_ring *ring, size_t bytes) |
LWS_VISIBLE LWS_EXTERN unsigned char * | lws_SHA1 (const unsigned char *d, size_t n, unsigned char *md) |
LWS_VISIBLE LWS_EXTERN int | lws_b64_encode_string (const char *in, int in_len, char *out, int out_size) |
LWS_VISIBLE LWS_EXTERN int | lws_b64_decode_string (const char *in, char *out, int out_size) |
LWS_VISIBLE LWS_EXTERN int | lws_cgi (struct lws *wsi, const char *const *exec_array, int script_uri_path_len, int timeout_secs, const struct lws_protocol_vhost_options *mp_cgienv) |
LWS_VISIBLE LWS_EXTERN int | lws_cgi_write_split_stdout_headers (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN int | lws_cgi_kill (struct lws *wsi) |
LWS_VISIBLE LWS_EXTERN struct lws * | lws_cgi_get_stdwsi (struct lws *wsi, enum lws_enum_stdinouterr ch) |
LWS_VISIBLE LWS_EXTERN struct lws_plat_file_ops *LWS_WARN_UNUSED_RESULT | lws_get_fops (struct lws_context *context) |
LWS_VISIBLE LWS_EXTERN void | lws_set_fops (struct lws_context *context, const struct lws_plat_file_ops *fops) |
LWS_VISIBLE LWS_EXTERN lws_filepos_t LWS_WARN_UNUSED_RESULT | lws_vfs_tell (lws_fop_fd_t fop_fd) |
LWS_VISIBLE LWS_EXTERN lws_filepos_t LWS_WARN_UNUSED_RESULT | lws_vfs_get_length (lws_fop_fd_t fop_fd) |
LWS_VISIBLE LWS_EXTERN uint32_t LWS_WARN_UNUSED_RESULT | lws_vfs_get_mod_time (lws_fop_fd_t fop_fd) |
LWS_VISIBLE LWS_EXTERN lws_fileofs_t | lws_vfs_file_seek_set (lws_fop_fd_t fop_fd, lws_fileofs_t offset) |
LWS_VISIBLE LWS_EXTERN lws_fileofs_t | lws_vfs_file_seek_end (lws_fop_fd_t fop_fd, lws_fileofs_t offset) |
LWS_VISIBLE LWS_EXTERN lws_fop_fd_t LWS_WARN_UNUSED_RESULT | lws_vfs_file_open (const struct lws_plat_file_ops *fops, const char *vfs_path, lws_fop_flags_t *flags) |
LWS_VISIBLE LWS_EXTERN lws_fop_fd_t | _lws_plat_file_open (const struct lws_plat_file_ops *fops, const char *filename, const char *vpath, lws_fop_flags_t *flags) |
LWS_VISIBLE LWS_EXTERN int | _lws_plat_file_close (lws_fop_fd_t *fop_fd) |
LWS_VISIBLE LWS_EXTERN lws_fileofs_t | _lws_plat_file_seek_cur (lws_fop_fd_t fop_fd, lws_fileofs_t offset) |
LWS_VISIBLE LWS_EXTERN int | _lws_plat_file_read (lws_fop_fd_t fop_fd, lws_filepos_t *amount, uint8_t *buf, lws_filepos_t len) |
LWS_VISIBLE LWS_EXTERN int | _lws_plat_file_write (lws_fop_fd_t fop_fd, lws_filepos_t *amount, uint8_t *buf, lws_filepos_t len) |
LWS_VISIBLE LWS_EXTERN int | lws_alloc_vfs_file (struct lws_context *context, const char *filename, uint8_t **buf, lws_filepos_t *amount) |
LWS_VISIBLE LWS_EXTERN int | lws_email_init (struct lws_email *email, uv_loop_t *loop, int max_content) |
LWS_VISIBLE LWS_EXTERN void | lws_email_check (struct lws_email *email) |
LWS_VISIBLE LWS_EXTERN void | lws_email_destroy (struct lws_email *email) |
LWS_VISIBLE LWS_EXTERN uint64_t | lws_stats_get (struct lws_context *context, int index) |
LWS_VISIBLE LWS_EXTERN void | lws_stats_log_dump (struct lws_context *context) |
Variables | |
struct lws_esp32 | lws_esp32 |
struct lws_plat_file_ops | fops_zip |
anonymous enum |
LWS_VISIBLE LWS_EXTERN int lws_cgi | ( | struct lws * | wsi, |
const char *const * | exec_array, | ||
int | script_uri_path_len, | ||
int | timeout_secs, | ||
const struct lws_protocol_vhost_options * | mp_cgienv | ||
) |
lws_cgi: spawn network-connected cgi process
wsi | connection to own the process |
exec_array | array of "exec-name" "arg1" ... "argn" NULL |
script_uri_path_len | how many chars on the left of the uri are the path to the cgi, or -1 to spawn without URL-related env vars |
timeout_secs | seconds script should be allowed to run |
mp_cgienv | pvo list with per-vhost cgi options to put in env |
LWS_VISIBLE LWS_EXTERN struct lws* lws_cgi_get_stdwsi | ( | struct lws * | wsi, |
enum lws_enum_stdinouterr | ch | ||
) |
lws_cgi_get_stdwsi: get wsi for stdin, stdout, or stderr
wsi | parent wsi that has cgi |
ch | which of LWS_STDIN, LWS_STDOUT or LWS_STDERR |
LWS_VISIBLE LWS_EXTERN int lws_cgi_kill | ( | struct lws * | wsi | ) |
lws_cgi_kill: terminate cgi process associated with wsi
wsi | connection to own the process |
LWS_VISIBLE LWS_EXTERN int lws_cgi_write_split_stdout_headers | ( | struct lws * | wsi | ) |
lws_cgi_write_split_stdout_headers: write cgi output accounting for header part
wsi | connection to own the process |
LWS_VISIBLE LWS_EXTERN size_t lws_remaining_packet_payload | ( | struct lws * | wsi | ) |
lws_remaining_packet_payload() - Bytes to come before "overall" rx packet is complete
wsi | Websocket instance (available from user callback) This function is intended to be called from the callback if theuser code is interested in "complete packets" from the client. libwebsockets just passes through payload as it comes and issues a buffer additionally when it hits a built-in limit. The LWS_CALLBACK_RECEIVE callback handler can use this API to find out if the buffer it has just been given is the last piece of a "complete packet" from the client – when that is the case lws_remaining_packet_payload() will return 0. |
Many protocols won't care becuse their packets are always small.
LWS_VISIBLE LWS_EXTERN void lws_rx_flow_allow_all_protocol | ( | const struct lws_context * | context, |
const struct lws_protocols * | protocol | ||
) |
lws_rx_flow_allow_all_protocol() - Allow all connections with this protocol to receive
When the user server code realizes it can accept more input, it can call this to have the RX flow restriction removed from all connections using the given protocol.
context | lws_context |
protocol | all connections using this protocol will be allowed to receive |
LWS_VISIBLE LWS_EXTERN int lws_rx_flow_control | ( | struct lws * | wsi, |
int | enable | ||
) |
lws_rx_flow_control() - Enable and disable socket servicing for received packets.
If the output side of a server process becomes choked, this allows flow control for the input side.
wsi | Websocket connection instance to get callback for |
enable | 0 = disable read servicing for this connection, 1 = enable |
If you need more than one additive reason for rxflow control, you can give iLWS_RXFLOW_REASON_APPLIES_ENABLE or _DISABLE together with one or more of b5..b0 set to idicate which bits to enable or disable. If any bits are enabled, rx on the connection is suppressed.
LWS_RXFLOW_REASON_FLAG_PROCESS_NOW flag may also be given to force any change in rxflowbstatus to benapplied immediately, this should be used when you are changing a wsi flow control state from outside a callback on that wsi.