libwebsockets
Lightweight C library for HTML5 websockets
libwebsockets.h File Reference
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "lws_config.h"
#include <unistd.h>
#include <poll.h>
#include <netdb.h>
#include <sys/time.h>
#include <libwebsockets/lws-logs.h>
#include <stddef.h>
#include <libwebsockets/lws-dll2.h>
#include <libwebsockets/lws-map.h>
#include <libwebsockets/lws-fault-injection.h>
#include <libwebsockets/lws-timeout-timer.h>
#include <libwebsockets/lws-cache-ttl.h>
#include <libwebsockets/lws-state.h>
#include <libwebsockets/lws-retry.h>
#include <libwebsockets/lws-adopt.h>
#include <libwebsockets/lws-network-helper.h>
#include <libwebsockets/lws-metrics.h>
#include <libwebsockets/lws-system.h>
#include <libwebsockets/lws-ws-close.h>
#include <libwebsockets/lws-callbacks.h>
#include <libwebsockets/lws-ws-state.h>
#include <libwebsockets/lws-ws-ext.h>
#include <libwebsockets/lws-protocols-plugins.h>
#include <libwebsockets/lws-context-vhost.h>
#include <libwebsockets/lws-client.h>
#include <libwebsockets/lws-http.h>
#include <libwebsockets/lws-spa.h>
#include <libwebsockets/lws-purify.h>
#include <libwebsockets/lws-misc.h>
#include <libwebsockets/lws-dsh.h>
#include <libwebsockets/lws-service.h>
#include <libwebsockets/lws-write.h>
#include <libwebsockets/lws-writeable.h>
#include <libwebsockets/lws-ring.h>
#include <libwebsockets/lws-sha1-base64.h>
#include <libwebsockets/lws-x509.h>
#include <libwebsockets/lws-cgi.h>
#include <libwebsockets/lws-gencrypto.h>
#include <libwebsockets/lws-lejp.h>
#include <libwebsockets/lws-lecp.h>
#include <libwebsockets/lws-cose.h>
#include <libwebsockets/lws-struct.h>
#include <libwebsockets/lws-threadpool.h>
#include <libwebsockets/lws-tokenize.h>
#include <libwebsockets/lws-lwsac.h>
#include <libwebsockets/lws-fts.h>
#include <libwebsockets/lws-diskcache.h>
#include <libwebsockets/lws-sequencer.h>
#include <libwebsockets/lws-secure-streams.h>
#include <libwebsockets/lws-secure-streams-policy.h>
#include <libwebsockets/lws-secure-streams-client.h>
#include <libwebsockets/abstract/abstract.h>
#include <libwebsockets/lws-test-sequencer.h>
#include <libwebsockets/lws-async-dns.h>
#include <libwebsockets/lws-eventlib-exports.h>
#include <libwebsockets/lws-i2c.h>
#include <libwebsockets/lws-spi.h>
#include <libwebsockets/lws-gpio.h>
#include <libwebsockets/lws-bb-i2c.h>
#include <libwebsockets/lws-bb-spi.h>
#include <libwebsockets/lws-button.h>
#include <libwebsockets/lws-led.h>
#include <libwebsockets/lws-pwm.h>
#include <libwebsockets/lws-display.h>
#include <libwebsockets/lws-ssd1306-i2c.h>
#include <libwebsockets/lws-ili9341-spi.h>
#include <libwebsockets/lws-settings.h>
#include <libwebsockets/lws-netdev.h>

Go to the source code of this file.

Data Structures

struct  lws_pollargs
 

Macros

#define LWS_US_PER_SEC   ((lws_usec_t)1000000)
 
#define LWS_MS_PER_SEC   ((lws_usec_t)1000)
 
#define LWS_US_PER_MS   ((lws_usec_t)1000)
 
#define LWS_NS_PER_US   ((lws_usec_t)1000)
 
#define LWS_KI   (1024)
 
#define LWS_MI   (LWS_KI * 1024)
 
#define LWS_GI   (LWS_MI * 1024)
 
#define LWS_TI   ((uint64_t)LWS_GI * 1024)
 
#define LWS_PI   ((uint64_t)LWS_TI * 1024)
 
#define LWS_US_TO_MS(x)   ((x + (LWS_US_PER_MS / 2)) / LWS_US_PER_MS)
 
#define LWS_INLINE   inline
 
#define LWS_O_RDONLY   O_RDONLY
 
#define LWS_O_WRONLY   O_WRONLY
 
#define LWS_O_CREAT   O_CREAT
 
#define LWS_O_TRUNC   O_TRUNC
 
#define LWS_INVALID_FILE   -1
 
#define LWS_SOCK_INVALID   (-1)
 
#define LWS_VISIBLE
 
#define LWS_WARN_UNUSED_RESULT
 
#define LWS_WARN_DEPRECATED
 
#define LWS_FORMAT(string_index)
 
#define LWS_EXTERN   extern
 
#define lws_pthread_mutex(name)
 
#define lws_pthread_mutex_init(_a)
 
#define lws_pthread_mutex_destroy(_a)
 
#define lws_pthread_mutex_lock(_a)
 
#define lws_pthread_mutex_unlock(_a)
 
#define CONTEXT_PORT_NO_LISTEN   -1
 
#define CONTEXT_PORT_NO_LISTEN_SERVER   -2
 
#define lws_container_of(P, T, M)   ((T *)((char *)(P) - offsetof(T, M)))
 
#define LWS_ALIGN_TO(x, bou)   x += ((bou) - ((x) % (bou))) % (bou)
 
#define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_ARG
 
#define LWS_FEATURE_PROTOCOLS_HAS_ID_FIELD
 
#define LWS_FEATURE_PROTOCOLS_HAS_PEER_WRITE_ALLOWANCE
 
#define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_LEN
 
#define LWS_FEATURE_FOPS
 
#define lws_pollfd   pollfd
 
#define LWS_POLLHUP   (POLLHUP | POLLERR)
 
#define LWS_POLLIN   (POLLIN)
 
#define LWS_POLLOUT   (POLLOUT)
 
#define lws_concat_temp(_t, _l)   (_t + sizeof(_t) - _l)
 
#define lws_concat_used(_t, _l)   (sizeof(_t) - _l)
 

Typedefs

typedef struct lws_context * lws_ctx_t
 
typedef unsigned long long lws_intptr_t
 
typedef int lws_sockfd_type
 
typedef int lws_filefd_type
 
typedef unsigned int uint32_t
 
typedef unsigned short uint16_t
 
typedef unsigned char uint8_t
 
typedef int64_t lws_usec_t
 
typedef unsigned long long lws_filepos_t
 
typedef long long lws_fileofs_t
 
typedef uint32_t lws_fop_flags_t