summaryrefslogtreecommitdiffstats
path: root/thirdparty/wslay/wslay_event.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-11-19 13:28:01 +0100
committerRémi Verschelde <rverschelde@gmail.com>2021-11-19 15:47:20 +0100
commita706ef3272e0fcd97398334da74b81d3a5ffa0a1 (patch)
tree2f77752934146692b5b40ef11debcd4840c8205a /thirdparty/wslay/wslay_event.h
parent42f8bfaff0dc5a94ca351b1eaadc42cb95655b87 (diff)
downloadredot-engine-a706ef3272e0fcd97398334da74b81d3a5ffa0a1.tar.gz
wslay: Sync with upstream 45d22583b
https://github.com/tatsuhiro-t/wslay/commit/45d22583b488f79d5a4e598cc7675c191c5ab53f Mostly style changes, a couple new methods and fixes. Tweak file structure a bit.
Diffstat (limited to 'thirdparty/wslay/wslay_event.h')
-rw-r--r--thirdparty/wslay/wslay_event.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/thirdparty/wslay/wslay_event.h b/thirdparty/wslay/wslay_event.h
index 36feb9036d..e30c3d1940 100644
--- a/thirdparty/wslay/wslay_event.h
+++ b/thirdparty/wslay/wslay_event.h
@@ -31,10 +31,10 @@
#include <wslay/wslay.h>
-struct wslay_stack;
-struct wslay_queue;
+#include "wslay_queue.h"
struct wslay_event_byte_chunk {
+ struct wslay_queue_entry qe;
uint8_t *data;
size_t data_length;
};
@@ -44,16 +44,14 @@ struct wslay_event_imsg {
uint8_t rsv;
uint8_t opcode;
uint32_t utf8state;
- struct wslay_queue *chunks;
+ struct wslay_queue chunks;
size_t msg_length;
};
-enum wslay_event_msg_type {
- WSLAY_NON_FRAGMENTED,
- WSLAY_FRAGMENTED
-};
+enum wslay_event_msg_type { WSLAY_NON_FRAGMENTED, WSLAY_FRAGMENTED };
struct wslay_event_omsg {
+ struct wslay_queue_entry qe;
uint8_t fin;
uint8_t opcode;
uint8_t rsv;
@@ -77,9 +75,7 @@ enum wslay_event_close_status {
WSLAY_CLOSE_SENT = 1 << 2
};
-enum wslay_event_config {
- WSLAY_CONFIG_NO_BUFFERING = 1 << 0
-};
+enum wslay_event_config { WSLAY_CONFIG_NO_BUFFERING = 1 << 0 };
struct wslay_event_context {
/* config status, bitwise OR of enum wslay_event_config values*/
@@ -118,9 +114,9 @@ struct wslay_event_context {
is currently sent. */
struct wslay_event_omsg *omsg;
/* Queue for non-control frames */
- struct wslay_queue/*<wslay_omsg*>*/ *send_queue;
+ struct wslay_queue /*<wslay_omsg*>*/ send_queue;
/* Queue for control frames */
- struct wslay_queue/*<wslay_omsg*>*/ *send_ctrl_queue;
+ struct wslay_queue /*<wslay_omsg*>*/ send_ctrl_queue;
/* Size of send_queue + size of send_ctrl_queue */
size_t queued_msg_count;
/* The sum of message length in send_queue */