diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index 28e649c6..5ad749dd 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -836,7 +836,8 @@ libwebsocket_context_user(struct libwebsocket_context *context); * // fill your part of the buffer... for example here it's all zeros * memset(&buf[LWS_SEND_BUFFER_PRE_PADDING], 0, 128); * - * libwebsocket_write(wsi, &buf[LWS_SEND_BUFFER_PRE_PADDING], 128); + * libwebsocket_write(wsi, &buf[LWS_SEND_BUFFER_PRE_PADDING], 128, + * LWS_WRITE_TEXT); * * When sending LWS_WRITE_HTTP, there is no protocol addition and you can just * use the whole buffer without taking care of the above.