Skip to content

Commit bcbeebc

Browse files
committed
update libwebsockets
1 parent 89e6040 commit bcbeebc

File tree

193 files changed

+44950
-267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+44950
-267
lines changed

dependencies/slicksocket/include/lws/libwebsockets.h

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ typedef int suseconds_t;
125125
#define LWS_EXTERN
126126
#endif
127127

128+
#if defined(__MINGW32__)
129+
#define LWS_INVALID_FILE -1
130+
#else
128131
#define LWS_INVALID_FILE INVALID_HANDLE_VALUE
132+
#endif
129133
#define LWS_SOCK_INVALID (INVALID_SOCKET)
130134
#define LWS_O_RDONLY _O_RDONLY
131135
#define LWS_O_WRONLY _O_WRONLY
@@ -287,6 +291,18 @@ typedef int suseconds_t;
287291
#include <mbedtls/ssl.h>
288292
#include <mbedtls/entropy.h>
289293
#include <mbedtls/ctr_drbg.h>
294+
#include <mbedtls/version.h>
295+
296+
#if !defined(MBEDTLS_PRIVATE)
297+
#define MBEDTLS_PRIVATE(_q) _q
298+
#endif
299+
300+
#if (MBEDTLS_VERSION_MAJOR == 3) && (MBEDTLS_VERSION_MINOR == 0)
301+
#define MBEDTLS_PRIVATE_V30_ONLY(_q) MBEDTLS_PRIVATE(_q)
302+
#else
303+
#define MBEDTLS_PRIVATE_V30_ONLY(_q) _q
304+
#endif
305+
290306
#endif
291307
#else
292308
#include <openssl/ssl.h>
@@ -378,8 +394,12 @@ struct lws;
378394
#if defined(_WIN32)
379395
#if !defined(LWS_WIN32_HANDLE_TYPES)
380396
typedef SOCKET lws_sockfd_type;
397+
#if defined(__MINGW32__)
398+
typedef int lws_filefd_type;
399+
#else
381400
typedef HANDLE lws_filefd_type;
382401
#endif
402+
#endif
383403

384404

385405
#define lws_pollfd pollfd
@@ -566,8 +586,11 @@ struct lws_vhost;
566586
struct lws;
567587

568588
#include <libwebsockets/lws-dll2.h>
589+
#include <libwebsockets/lws-map.h>
590+
569591
#include <libwebsockets/lws-fault-injection.h>
570592
#include <libwebsockets/lws-timeout-timer.h>
593+
#include <libwebsockets/lws-cache-ttl.h>
571594
#if defined(LWS_WITH_SYS_SMD)
572595
#include <libwebsockets/lws-smd.h>
573596
#endif
@@ -585,6 +608,10 @@ struct lws;
585608

586609
#include <libwebsockets/lws-context-vhost.h>
587610

611+
#if defined(LWS_WITH_CONMON)
612+
#include <libwebsockets/lws-conmon.h>
613+
#endif
614+
588615
#if defined(LWS_ROLE_MQTT)
589616
#include <libwebsockets/lws-mqtt.h>
590617
#endif
@@ -604,7 +631,11 @@ struct lws;
604631
#if defined(LWS_WITH_FILE_OPS)
605632
#include <libwebsockets/lws-vfs.h>
606633
#endif
634+
#include <libwebsockets/lws-gencrypto.h>
635+
607636
#include <libwebsockets/lws-lejp.h>
637+
#include <libwebsockets/lws-lecp.h>
638+
#include <libwebsockets/lws-cose.h>
608639
#include <libwebsockets/lws-struct.h>
609640
#include <libwebsockets/lws-threadpool.h>
610641
#include <libwebsockets/lws-tokenize.h>
@@ -625,14 +656,15 @@ struct lws;
625656

626657
#if defined(LWS_WITH_TLS)
627658

659+
#include <libwebsockets/lws-tls-sessions.h>
660+
628661
#if defined(LWS_WITH_MBEDTLS)
629662
#include <mbedtls/md5.h>
630663
#include <mbedtls/sha1.h>
631664
#include <mbedtls/sha256.h>
632665
#include <mbedtls/sha512.h>
633666
#endif
634667

635-
#include <libwebsockets/lws-gencrypto.h>
636668
#include <libwebsockets/lws-genhash.h>
637669
#include <libwebsockets/lws-genrsa.h>
638670
#include <libwebsockets/lws-genaes.h>

dependencies/slicksocket/include/lws/libwebsockets/lws-adopt.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ typedef struct lws_adopt_desc {
152152
const char *vh_prot_name; /**< NULL or vh protocol name to bind raw connection to */
153153
struct lws *parent; /**< NULL or struct lws to attach new_wsi to as a child */
154154
void *opaque; /**< opaque pointer to set on created wsi */
155+
const char *fi_wsi_name; /**< NULL, or Fault Injection inheritence filter for wsi=string/ context faults */
155156
} lws_adopt_desc_t;
156157

157158
/**
@@ -249,6 +250,11 @@ lws_adopt_socket_vhost_readbuf(struct lws_vhost *vhost,
249250
* \param parent_wsi: NULL or parent wsi new wsi will be a child of
250251
* \param opaque: set created wsi opaque ptr to this
251252
* \param retry_policy: NULL for vhost default policy else wsi specific policy
253+
* \param fi_wsi_name: NULL, or string to inherit Fault Injection rules in
254+
* form "wsi=string/rule". "wsi/rule" faults will be
255+
* automatically applied as well. It's done at creation
256+
* time so the rules can, eg, inject faults related to
257+
* creation.
252258
*
253259
* Either returns new wsi bound to accept_fd, or closes accept_fd and
254260
* returns NULL, having cleaned up any new wsi pieces.
@@ -257,7 +263,7 @@ LWS_VISIBLE LWS_EXTERN struct lws *
257263
lws_create_adopt_udp(struct lws_vhost *vhost, const char *ads, int port,
258264
int flags, const char *protocol_name, const char *ifname,
259265
struct lws *parent_wsi, void *opaque,
260-
const lws_retry_bo_t *retry_policy);
266+
const lws_retry_bo_t *retry_policy, const char *fi_wsi_name);
261267
#endif
262268

263269

0 commit comments

Comments
 (0)