aboutsummaryrefslogtreecommitdiff
path: root/src/net/websocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/websocket.h')
-rw-r--r--src/net/websocket.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/net/websocket.h b/src/net/websocket.h
new file mode 100644
index 0000000..98ae1ae
--- /dev/null
+++ b/src/net/websocket.h
@@ -0,0 +1,16 @@
+#include "../lua.h"
+#include "common.h"
+
+struct ws_frame_info {
+ int fin;
+ int rsv1;
+ int rsv2;
+ int rsv3;
+ int opcode;
+ int mask;
+ int payload;
+};
+
+int ws_read(struct net_data* data, struct ws_frame_info* frame_info);
+struct ws_frame_info ws_frame_decode(char* buffer);
+int l_websocket_upgrade(lua_State* L);