diff options
author | cbdev <cb@cbcdn.com> | 2019-05-17 19:41:14 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-05-17 19:41:14 +0200 |
commit | d28b5eb2960e80d80e967a3f01ce70e1fa457808 (patch) | |
tree | f19f22d441f9e66c9c17476477707e65d5e425cc /websocksy.h | |
parent | 10874eb2195d3e6ceed8e8a76aaf4455e41c8683 (diff) | |
download | websocksy-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.h | 15 |
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; |