aboutsummaryrefslogtreecommitdiff
path: root/websocksy.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-05-17 19:41:14 +0200
committercbdev <cb@cbcdn.com>2019-05-17 19:41:14 +0200
commitd28b5eb2960e80d80e967a3f01ce70e1fa457808 (patch)
treef19f22d441f9e66c9c17476477707e65d5e425cc /websocksy.h
parent10874eb2195d3e6ceed8e8a76aaf4455e41c8683 (diff)
downloadwebsocksy-d28b5eb2960e80d80e967a3f01ce70e1fa457808.tar.gz
websocksy-d28b5eb2960e80d80e967a3f01ce70e1fa457808.tar.bz2
websocksy-d28b5eb2960e80d80e967a3f01ce70e1fa457808.zip
Split out websocket handling, HTTP header processing
Diffstat (limited to 'websocksy.h')
-rw-r--r--websocksy.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/websocksy.h b/websocksy.h
index 0fc9538..794b4ed 100644
--- a/websocksy.h
+++ b/websocksy.h
@@ -21,17 +21,18 @@ struct {
.backend.name = "internal"
};
-typedef struct {
- char* name;
- int fd;
-} ws_proto;
-
typedef struct /*_web_socket*/ {
+ int fd;
+ int peer;
uint8_t read_buffer[WS_MAX_LINE];
size_t read_buffer_offset;
ws_state state;
- int fd;
+ char* request_path;
+ unsigned websocket_version;
+ char* socket_key;
+ unsigned want_upgrade;
+
size_t protocols;
- ws_proto* protocol;
+ char** protocol;
} websocket;