diff options
author | cbdev <cb@cbcdn.com> | 2019-05-04 18:30:23 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-05-04 18:30:23 +0200 |
commit | a170ae3ac205675d86f1a564a51c54d0fbc2a380 (patch) | |
tree | 698872f06cb9934f74af3ff1ec6a6c1b0373df23 /websocksy.h | |
download | websocksy-a170ae3ac205675d86f1a564a51c54d0fbc2a380.tar.gz websocksy-a170ae3ac205675d86f1a564a51c54d0fbc2a380.tar.bz2 websocksy-a170ae3ac205675d86f1a564a51c54d0fbc2a380.zip |
Basic connection handling
Diffstat (limited to 'websocksy.h')
-rw-r--r-- | websocksy.h | 25 |
1 files changed, 25 insertions, 0 deletions
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 <stdint.h> +#include <stdlib.h> + +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; |