From a170ae3ac205675d86f1a564a51c54d0fbc2a380 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sat, 4 May 2019 18:30:23 +0200 Subject: Basic connection handling --- websocksy.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 websocksy.h (limited to 'websocksy.h') diff --git a/websocksy.h b/websocksy.h new file mode 100644 index 0000000..36a713d --- /dev/null +++ b/websocksy.h @@ -0,0 +1,25 @@ +#include +#include + +struct { + char* host; + char* port; + struct { + char* name; + } backend; +} config = { + .host = "::", + .port = "8001", + .backend.name = "internal" +}; + +typedef struct { + char* name; + int fd; +} ws_proto; + +typedef struct /*_web_socket*/ { + int fd; + size_t protocols; + ws_proto* protocol; +} websocket; -- cgit v1.2.3