From 5d9d94ba091a1940821b4487046ed2f01dcf2a89 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 7 Mar 2011 20:47:41 +0000 Subject: [PATCH] add CONTINUATION write mode Signed-off-by: Andy Green --- lib/libwebsockets.h | 1 + lib/parsers.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index ec55ec82..d51229d2 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -85,6 +85,7 @@ enum libwebsocket_extension_callback_reasons { enum libwebsocket_write_protocol { LWS_WRITE_TEXT, LWS_WRITE_BINARY, + LWS_WRITE_CONTINUATION, LWS_WRITE_HTTP, /* special 04+ opcodes */ diff --git a/lib/parsers.c b/lib/parsers.c index b116dddd..f87b1d82 100644 --- a/lib/parsers.c +++ b/lib/parsers.c @@ -1194,6 +1194,10 @@ int libwebsocket_write(struct libwebsocket *wsi, unsigned char *buf, case LWS_WRITE_BINARY: n = LWS_WS_OPCODE_04__BINARY_FRAME; break; + case LWS_WRITE_CONTINUATION: + n = LWS_WS_OPCODE_04__CONTINUATION; + break; + case LWS_WRITE_CLOSE: n = LWS_WS_OPCODE_04__CLOSE;