libwebsockets
Lightweight C library for HTML5 websockets
libwebsockets.h
Go to the documentation of this file.
1 /*
2  * libwebsockets - small server side websockets and web server implementation
3  *
4  * Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22  * IN THE SOFTWARE.
23  */
24 
27 #ifndef LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
28 #define LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
29 
30 #ifdef __cplusplus
31 #include <cstddef>
32 #include <cstdarg>
33 
34 extern "C" {
35 #else
36 #include <stdarg.h>
37 #endif
38 
39 #include <string.h>
40 #include <stdlib.h>
41 
42 #include "lws_config.h"
43 
44 /* place for one-shot opaque forward references */
45 
46 typedef struct lws_context * lws_ctx_t;
47 struct lws_sequencer;
48 struct lws_dsh;
49 
50 /*
51  * CARE: everything using cmake defines needs to be below here
52  */
53 
54 #define LWS_US_PER_SEC ((lws_usec_t)1000000)
55 #define LWS_MS_PER_SEC ((lws_usec_t)1000)
56 #define LWS_US_PER_MS ((lws_usec_t)1000)
57 #define LWS_NS_PER_US ((lws_usec_t)1000)
58 
59 #define LWS_KI (1024)
60 #define LWS_MI (LWS_KI * 1024)
61 #define LWS_GI (LWS_MI * 1024)
62 #define LWS_TI ((uint64_t)LWS_GI * 1024)
63 #define LWS_PI ((uint64_t)LWS_TI * 1024)
64 
65 #define LWS_US_TO_MS(x) ((x + (LWS_US_PER_MS / 2)) / LWS_US_PER_MS)
66 
67 #if defined(LWS_HAS_INTPTR_T)
68 #include <stdint.h>
69 #define lws_intptr_t intptr_t
70 #else
71 typedef unsigned long long lws_intptr_t;
72 #endif
73 
74 #if defined(WIN32) || defined(_WIN32)
75 #ifndef WIN32_LEAN_AND_MEAN
76 #define WIN32_LEAN_AND_MEAN
77 #endif
78 
79 #include <winsock2.h>
80 #include <ws2tcpip.h>
81 #include <stddef.h>
82 #include <basetsd.h>
83 #include <io.h>
84 #ifndef _WIN32_WCE
85 #include <fcntl.h>
86 #else
87 #define _O_RDONLY 0x0000
88 #define O_RDONLY _O_RDONLY
89 #endif
90 
91 #define LWS_INLINE __inline
92 #define LWS_VISIBLE
93 #define LWS_WARN_UNUSED_RESULT
94 #define LWS_WARN_DEPRECATED
95 #define LWS_FORMAT(string_index)
96 
97 #if !defined(LWS_EXTERN) && defined(LWS_BUILDING_SHARED)
98 #ifdef LWS_DLL
99 #ifdef LWS_INTERNAL
100 #define LWS_EXTERN extern __declspec(dllexport)
101 #else
102 #define LWS_EXTERN extern __declspec(dllimport)
103 #endif
104 #endif
105 #endif
106 
107 #if !defined(LWS_INTERNAL) && !defined(LWS_EXTERN)
108 #define LWS_EXTERN
109 #define LWS_VISIBLE
110 #endif
111 
112 #if !defined(LWS_EXTERN)
113 #define LWS_EXTERN
114 #endif
115 
116 #define LWS_INVALID_FILE INVALID_HANDLE_VALUE
117 #define LWS_SOCK_INVALID (INVALID_SOCKET)
118 #define LWS_O_RDONLY _O_RDONLY
119 #define LWS_O_WRONLY _O_WRONLY
120 #define LWS_O_CREAT _O_CREAT
121 #define LWS_O_TRUNC _O_TRUNC
122 
123 #ifndef __func__
124 #define __func__ __FUNCTION__
125 #endif
126 
127 #else /* NOT WIN32 */
128 #include <unistd.h>
129 #if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
130 #include <sys/capability.h>
131 #endif
132 
133 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__QNX__) || defined(__OpenBSD__)
134 #include <sys/socket.h>
135 #include <netinet/in.h>
136 #endif
137 
138 #define LWS_INLINE inline
139 #define LWS_O_RDONLY O_RDONLY
140 #define LWS_O_WRONLY O_WRONLY
141 #define LWS_O_CREAT O_CREAT
142 #define LWS_O_TRUNC O_TRUNC
143 
144 #if !defined(LWS_PLAT_OPTEE) && !defined(OPTEE_TA) && !defined(LWS_PLAT_FREERTOS)
145 #include <poll.h>
146 #include <netdb.h>
147 #define LWS_INVALID_FILE -1
148 #define LWS_SOCK_INVALID (-1)
149 #else
150 #define getdtablesize() (30)
151 #if defined(LWS_PLAT_FREERTOS)
152 #define LWS_INVALID_FILE NULL
153 #define LWS_SOCK_INVALID (-1)
154 #else
155 #define LWS_INVALID_FILE NULL
156 #define LWS_SOCK_INVALID (-1)
157 #endif
158 #endif
159 
160 #if defined(__FreeBSD__)
161 #include <sys/signal.h>
162 #endif
163 #if defined(__GNUC__)
164 
165 /* warn_unused_result attribute only supported by GCC 3.4 or later */
166 #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
167 #define LWS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
168 #else
169 #define LWS_WARN_UNUSED_RESULT
170 #endif
171 
172 #if defined(LWS_BUILDING_SHARED)
173 /* this is only set when we're building lws itself shared */
174 #define LWS_VISIBLE __attribute__((visibility("default")))
175 #define LWS_EXTERN extern
176 
177 #else /* not shared */
178 #if defined(WIN32) || defined(_WIN32) || defined(__MINGW32__)
179 #define LWS_VISIBLE
180 #define LWS_EXTERN extern
181 #else
182 /*
183  * If we explicitly say hidden here, symbols exist as T but
184  * cannot be imported at link-time.
185  */
186 #define LWS_VISIBLE
187 #define LWS_EXTERN
188 #endif
189 
190 #endif /* not shared */
191 
192 #define LWS_WARN_DEPRECATED __attribute__ ((deprecated))
193 #define LWS_FORMAT(string_index) __attribute__ ((format(printf, string_index, string_index+1)))
194 #else /* not GNUC */
195 
196 #define LWS_VISIBLE
197 #define LWS_WARN_UNUSED_RESULT
198 #define LWS_WARN_DEPRECATED
199 #define LWS_FORMAT(string_index)
200 #if !defined(LWS_EXTERN)
201 #define LWS_EXTERN extern
202 #endif
203 #endif
204 
205 
206 #if defined(__ANDROID__)
207 #include <netinet/in.h>
208 #include <unistd.h>
209 #endif
210 #endif
211 
212 #ifdef _WIN32
213 #define random rand
214 #else
215 #if !defined(LWS_PLAT_OPTEE)
216 #include <sys/time.h>
217 #include <unistd.h>
218 #endif
219 #endif
220 
221 #if defined(LWS_WITH_LIBUV_INTERNAL)
222 #include <uv.h>
223 
224 #ifdef LWS_HAVE_UV_VERSION_H
225 #include <uv-version.h>
226 #endif
227 
228 #ifdef LWS_HAVE_NEW_UV_VERSION_H
229 #include <uv/version.h>
230 #endif
231 #endif
232 
233 #if defined(LWS_WITH_TLS)
234 
235 #ifdef USE_WOLFSSL
236 #ifdef USE_OLD_CYASSL
237 #ifdef _WIN32
238 /*
239  * Include user-controlled settings for windows from
240  * <wolfssl-root>/IDE/WIN/user_settings.h
241  */
242 #include <IDE/WIN/user_settings.h>
243 #include <cyassl/ctaocrypt/settings.h>
244 #else
245 #include <cyassl/options.h>
246 #endif
247 #include <cyassl/openssl/ssl.h>
248 #include <cyassl/error-ssl.h>
249 
250 #else
251 #ifdef _WIN32
252 /*
253  * Include user-controlled settings for windows from
254  * <wolfssl-root>/IDE/WIN/user_settings.h
255  */
256 #include <IDE/WIN/user_settings.h>
257 #include <wolfssl/wolfcrypt/settings.h>
258 #else
259 #include <wolfssl/options.h>
260 #endif
261 #include <wolfssl/openssl/ssl.h>
262 #include <wolfssl/error-ssl.h>
263 #endif /* not USE_OLD_CYASSL */
264 #else
265 #if defined(LWS_WITH_MBEDTLS)
266 #if defined(LWS_PLAT_FREERTOS)
267 /* this filepath is passed to us but without quotes or <> */
268 #if !defined(LWS_AMAZON_RTOS)
269 /* AMAZON RTOS has its own setting via MTK_MBEDTLS_CONFIG_FILE */
270 #undef MBEDTLS_CONFIG_FILE
271 #define MBEDTLS_CONFIG_FILE <mbedtls/esp_config.h>
272 #endif
273 #endif
274 #if defined(LWS_WITH_TLS)
275 #include <mbedtls/ssl.h>
276 #include <mbedtls/entropy.h>
277 #include <mbedtls/ctr_drbg.h>
278 #endif
279 #else
280 #include <openssl/ssl.h>
281 #if !defined(LWS_WITH_MBEDTLS)
282 #include <openssl/err.h>
283 #endif
284 #endif
285 #endif /* not USE_WOLFSSL */
286 #endif
287 
288 /*
289  * Helpers for pthread mutex in user code... if lws is built for
290  * multiple service threads, these resolve to pthread mutex
291  * operations. In the case LWS_MAX_SMP is 1 (the default), they
292  * are all NOPs and no pthread type or api is referenced.
293  */
294 
295 #if LWS_MAX_SMP > 1
296 
297 #include <pthread.h>
298 
299 #define lws_pthread_mutex(name) pthread_mutex_t name;
300 
301 static LWS_INLINE void
302 lws_pthread_mutex_init(pthread_mutex_t *lock)
303 {
304  pthread_mutex_init(lock, NULL);
305 }
306 
307 static LWS_INLINE void
308 lws_pthread_mutex_destroy(pthread_mutex_t *lock)
309 {
310  pthread_mutex_destroy(lock);
311 }
312 
313 static LWS_INLINE void
314 lws_pthread_mutex_lock(pthread_mutex_t *lock)
315 {
316  pthread_mutex_lock(lock);
317 }
318 
319 static LWS_INLINE void
320 lws_pthread_mutex_unlock(pthread_mutex_t *lock)
321 {
322  pthread_mutex_unlock(lock);
323 }
324 
325 #else
326 #define lws_pthread_mutex(name)
327 #define lws_pthread_mutex_init(_a)
328 #define lws_pthread_mutex_destroy(_a)
329 #define lws_pthread_mutex_lock(_a)
330 #define lws_pthread_mutex_unlock(_a)
331 #endif
332 
333 
334 #define CONTEXT_PORT_NO_LISTEN -1
335 #define CONTEXT_PORT_NO_LISTEN_SERVER -2
336 
337 #include <libwebsockets/lws-logs.h>
338 
339 
340 #include <stddef.h>
341 
342 #ifndef lws_container_of
343 #define lws_container_of(P,T,M) ((T *)((char *)(P) - offsetof(T, M)))
344 #endif
345 #define LWS_ALIGN_TO(x, bou) x += ((bou) - ((x) % (bou))) % (bou)
346 
347 struct lws;
348 
349 /* api change list for user code to test against */
350 
351 #define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_ARG
352 
353 /* the struct lws_protocols has the id field present */
354 #define LWS_FEATURE_PROTOCOLS_HAS_ID_FIELD
355 
356 /* you can call lws_get_peer_write_allowance */
357 #define LWS_FEATURE_PROTOCOLS_HAS_PEER_WRITE_ALLOWANCE
358 
359 /* extra parameter introduced in 917f43ab821 */
360 #define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_LEN
361 
362 /* File operations stuff exists */
363 #define LWS_FEATURE_FOPS
364 
365 
366 #if defined(_WIN32)
367 #if !defined(LWS_WIN32_HANDLE_TYPES)
368 typedef SOCKET lws_sockfd_type;
369 typedef HANDLE lws_filefd_type;
370 #endif
371 
372 struct lws_pollfd {
373  lws_sockfd_type fd;
374  SHORT events;
375  SHORT revents;
376  uint8_t write_blocked;
377 };
378 #define LWS_POLLHUP (FD_CLOSE)
379 #define LWS_POLLIN (FD_READ | FD_ACCEPT)
380 #define LWS_POLLOUT (FD_WRITE)
381 
382 #else
383 
384 
385 #if defined(LWS_PLAT_FREERTOS)
386 #include <libwebsockets/lws-freertos.h>
387 #else
388 typedef int lws_sockfd_type;
389 typedef int lws_filefd_type;
390 #endif
391 
392 #if defined(LWS_PLAT_OPTEE)
393 #include <time.h>
394 struct timeval {
395  time_t tv_sec;
396  unsigned int tv_usec;
397 };
398 #if defined(LWS_WITH_NETWORK)
399 // #include <poll.h>
400 #define lws_pollfd pollfd
401 
402 struct timezone;
403 
404 int gettimeofday(struct timeval *tv, struct timezone *tz);
405 
406  /* Internet address. */
407  struct in_addr {
408  uint32_t s_addr; /* address in network byte order */
409  };
410 
411 typedef unsigned short sa_family_t;
412 typedef unsigned short in_port_t;
413 typedef uint32_t socklen_t;
414 
415 #include <libwebsockets/lws-optee.h>
416 
417 #if !defined(TEE_SE_READER_NAME_MAX)
418  struct addrinfo {
419  int ai_flags;
420  int ai_family;
421  int ai_socktype;
422  int ai_protocol;
423  socklen_t ai_addrlen;
424  struct sockaddr *ai_addr;
425  char *ai_canonname;
426  struct addrinfo *ai_next;
427  };
428 #endif
429 
430 ssize_t recv(int sockfd, void *buf, size_t len, int flags);
431 ssize_t send(int sockfd, const void *buf, size_t len, int flags);
432 ssize_t read(int fd, void *buf, size_t count);
433 int getsockopt(int sockfd, int level, int optname,
434  void *optval, socklen_t *optlen);
435  int setsockopt(int sockfd, int level, int optname,
436  const void *optval, socklen_t optlen);
437 int connect(int sockfd, const struct sockaddr *addr,
438  socklen_t addrlen);
439 
440 extern int errno;
441 
442 uint16_t ntohs(uint16_t netshort);
443 uint16_t htons(uint16_t hostshort);
444 
445 int bind(int sockfd, const struct sockaddr *addr,
446  socklen_t addrlen);
447 
448 
449 #define MSG_NOSIGNAL 0x4000
450 #define EAGAIN 11
451 #define EINTR 4
452 #define EWOULDBLOCK EAGAIN
453 #define EADDRINUSE 98
454 #define INADDR_ANY 0
455 #define AF_INET 2
456 #define SHUT_WR 1
457 #define AF_UNSPEC 0
458 #define PF_UNSPEC 0
459 #define SOCK_STREAM 1
460 #define SOCK_DGRAM 2
461 # define AI_PASSIVE 0x0001
462 #define IPPROTO_UDP 17
463 #define SOL_SOCKET 1
464 #define SO_SNDBUF 7
465 #define EISCONN 106
466 #define EALREADY 114
467 #define EINPROGRESS 115
468 int shutdown(int sockfd, int how);
469 int close(int fd);
470 int atoi(const char *nptr);
471 long long atoll(const char *nptr);
472 
473 int socket(int domain, int type, int protocol);
474  int getaddrinfo(const char *node, const char *service,
475  const struct addrinfo *hints,
476  struct addrinfo **res);
477 
478  void freeaddrinfo(struct addrinfo *res);
479 
480 #if !defined(TEE_SE_READER_NAME_MAX)
481 struct lws_pollfd
482 {
483  int fd; /* File descriptor to poll. */
484  short int events; /* Types of events poller cares about. */
485  short int revents; /* Types of events that actually occurred. */
486 };
487 #endif
488 
489 int poll(struct pollfd *fds, int nfds, int timeout);
490 
491 #define LWS_POLLHUP (0x18)
492 #define LWS_POLLIN (1)
493 #define LWS_POLLOUT (4)
494 #else
495 struct lws_pollfd;
496 struct sockaddr_in;
497 #endif
498 #else
499 #define lws_pollfd pollfd
500 #define LWS_POLLHUP (POLLHUP | POLLERR)
501 #define LWS_POLLIN (POLLIN)
502 #define LWS_POLLOUT (POLLOUT)
503 #endif
504 #endif
505 
506 
507 #if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__)
508 /* ... */
509 #define ssize_t SSIZE_T
510 #endif
511 
512 #if defined(WIN32) && defined(LWS_HAVE__STAT32I64)
513 #include <sys/types.h>
514 #include <sys/stat.h>
515 #endif
516 
517 #if defined(LWS_HAVE_STDINT_H)
518 #include <stdint.h>
519 #else
520 #if defined(WIN32) || defined(_WIN32)
521 /* !!! >:-[ */
522 typedef __int64 int64_t;
523 typedef unsigned __int64 uint64_t;
524 typedef __int32 int32_t;
525 typedef unsigned __int32 uint32_t;
526 typedef __int16 int16_t;
527 typedef unsigned __int16 uint16_t;
528 typedef unsigned __int8 uint8_t;
529 #else
530 typedef unsigned int uint32_t;
531 typedef unsigned short uint16_t;
532 typedef unsigned char uint8_t;
533 #endif
534 #endif
535 
536 typedef int64_t lws_usec_t;
537 typedef unsigned long long lws_filepos_t;
538 typedef long long lws_fileofs_t;
539 typedef uint32_t lws_fop_flags_t;
540 
541 #define lws_concat_temp(_t, _l) (_t + sizeof(_t) - _l)
542 #define lws_concat_used(_t, _l) (sizeof(_t) - _l)
543 
546 struct lws_pollargs {
547  lws_sockfd_type fd;
548  int events;
550 };
551 
552 struct lws_extension; /* needed even with ws exts disabled for create context */
553 struct lws_token_limits;
554 struct lws_protocols;
555 struct lws_context;
556 struct lws_tokens;
557 struct lws_vhost;
558 struct lws;
559 
560 #include <libwebsockets/lws-dll2.h>
561 #include <libwebsockets/lws-timeout-timer.h>
562 #if defined(LWS_WITH_SYS_SMD)
563 #include <libwebsockets/lws-smd.h>
564 #endif
565 #include <libwebsockets/lws-state.h>
566 #include <libwebsockets/lws-retry.h>
567 #include <libwebsockets/lws-adopt.h>
568 #include <libwebsockets/lws-network-helper.h>
569 #include <libwebsockets/lws-system.h>
570 #include <libwebsockets/lws-detailed-latency.h>
571 #include <libwebsockets/lws-ws-close.h>
572 #include <libwebsockets/lws-callbacks.h>
573 #include <libwebsockets/lws-ws-state.h>
574 #include <libwebsockets/lws-ws-ext.h>
575 #include <libwebsockets/lws-protocols-plugins.h>
576 
577 #include <libwebsockets/lws-context-vhost.h>
578 
579 #if defined(LWS_ROLE_MQTT)
580 #include <libwebsockets/lws-mqtt.h>
581 #endif
582 #include <libwebsockets/lws-client.h>
583 #include <libwebsockets/lws-http.h>
584 #include <libwebsockets/lws-spa.h>
585 #include <libwebsockets/lws-purify.h>
586 #include <libwebsockets/lws-misc.h>
587 #include <libwebsockets/lws-dsh.h>
588 #include <libwebsockets/lws-service.h>
589 #include <libwebsockets/lws-write.h>
590 #include <libwebsockets/lws-writeable.h>
591 #include <libwebsockets/lws-ring.h>
592 #include <libwebsockets/lws-sha1-base64.h>
593 #include <libwebsockets/lws-x509.h>
594 #include <libwebsockets/lws-cgi.h>
595 #if defined(LWS_WITH_FILE_OPS)
596 #include <libwebsockets/lws-vfs.h>
597 #endif
598 #include <libwebsockets/lws-lejp.h>
599 #include <libwebsockets/lws-stats.h>
600 #include <libwebsockets/lws-struct.h>
601 #include <libwebsockets/lws-threadpool.h>
602 #include <libwebsockets/lws-tokenize.h>
603 #include <libwebsockets/lws-lwsac.h>
604 #include <libwebsockets/lws-fts.h>
605 #include <libwebsockets/lws-diskcache.h>
606 #include <libwebsockets/lws-sequencer.h>
607 #include <libwebsockets/lws-secure-streams.h>
608 #include <libwebsockets/lws-secure-streams-policy.h>
609 #include <libwebsockets/lws-secure-streams-client.h>
610 
611 #if !defined(LWS_PLAT_FREERTOS)
612 #include <libwebsockets/abstract/abstract.h>
613 
614 #include <libwebsockets/lws-test-sequencer.h>
615 #endif
616 #include <libwebsockets/lws-async-dns.h>
617 
618 #if defined(LWS_WITH_TLS)
619 
620 #if defined(LWS_WITH_MBEDTLS)
621 #include <mbedtls/md5.h>
622 #include <mbedtls/sha1.h>
623 #include <mbedtls/sha256.h>
624 #include <mbedtls/sha512.h>
625 #endif
626 
627 #include <libwebsockets/lws-gencrypto.h>
628 #include <libwebsockets/lws-genhash.h>
629 #include <libwebsockets/lws-genrsa.h>
630 #include <libwebsockets/lws-genaes.h>
631 #include <libwebsockets/lws-genec.h>
632 
633 #include <libwebsockets/lws-jwk.h>
634 #include <libwebsockets/lws-jose.h>
635 #include <libwebsockets/lws-jws.h>
636 #include <libwebsockets/lws-jwe.h>
637 
638 #endif
639 
640 #include <libwebsockets/lws-eventlib-exports.h>
641 #include <libwebsockets/lws-i2c.h>
642 #include <libwebsockets/lws-spi.h>
643 #include <libwebsockets/lws-gpio.h>
644 #include <libwebsockets/lws-bb-i2c.h>
645 #include <libwebsockets/lws-bb-spi.h>
646 #include <libwebsockets/lws-button.h>
647 #include <libwebsockets/lws-led.h>
648 #include <libwebsockets/lws-pwm.h>
649 #include <libwebsockets/lws-display.h>
650 #include <libwebsockets/lws-ssd1306-i2c.h>
651 #include <libwebsockets/lws-ili9341-spi.h>
652 #include <libwebsockets/lws-settings.h>
653 #include <libwebsockets/lws-netdev.h>
654 
655 #ifdef __cplusplus
656 }
657 #endif
658 
659 #endif
lws_pollargs
Definition: libwebsockets.h:546
lws_pollargs::events
int events
Definition: libwebsockets.h:548
lws_pollargs::prev_events
int prev_events
Definition: libwebsockets.h:549
lws_pollargs::fd
lws_sockfd_type fd
Definition: libwebsockets.h:547
lws_extension
Definition: lws-ws-ext.h:139
lws_tokens
Definition: lws-http.h:204
lws_protocols
Definition: lws-protocols-plugins.h:44
lws_token_limits
Definition: lws-http.h:368