summaryrefslogtreecommitdiff
path: root/src/plugins/relay/relay-websocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/relay/relay-websocket.h')
-rw-r--r--src/plugins/relay/relay-websocket.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/relay/relay-websocket.h b/src/plugins/relay/relay-websocket.h
index 8d6e565b9..54eab904a 100644
--- a/src/plugins/relay/relay-websocket.h
+++ b/src/plugins/relay/relay-websocket.h
@@ -20,6 +20,13 @@
#ifndef WEECHAT_RELAY_WEBSOCKET_H
#define WEECHAT_RELAY_WEBSOCKET_H 1
+#define WEBSOCKET_FRAME_OPCODE_CONTINUATION 0x00
+#define WEBSOCKET_FRAME_OPCODE_TEXT 0x01
+#define WEBSOCKET_FRAME_OPCODE_BINARY 0x02
+#define WEBSOCKET_FRAME_OPCODE_CLOSE 0x08
+#define WEBSOCKET_FRAME_OPCODE_PING 0x09
+#define WEBSOCKET_FRAME_OPCODE_PONG 0x0A
+
extern int relay_websocket_is_http_get_weechat (const char *message);
extern void relay_websocket_save_header (struct t_relay_client *client,
const char *message);
@@ -31,7 +38,7 @@ extern int relay_websocket_decode_frame (const unsigned char *buffer,
unsigned long long length,
unsigned char *decoded,
unsigned long long *decoded_length);
-extern char *relay_websocket_encode_frame (struct t_relay_client *client,
+extern char *relay_websocket_encode_frame (int opcode,
const char *buffer,
unsigned long long length,
unsigned long long *length_frame);