From d28b5eb2960e80d80e967a3f01ce70e1fa457808 Mon Sep 17 00:00:00 2001 From: cbdev Date: Fri, 17 May 2019 19:41:14 +0200 Subject: Split out websocket handling, HTTP header processing --- websocksy.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'websocksy.h') 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; -- cgit v1.2.3