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