From 1a8ba0e96daea0ea355304b1864d1e14b532197a Mon Sep 17 00:00:00 2001 From: zephyr Date: Fri, 15 Apr 2022 01:11:42 +0900 Subject: [PATCH] docs --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 20a785b..ddbffd7 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,18 @@ Client or server side options: - `path=`* : set http path. +Client side extra options: + +- `mask=` : set mask mode. Available values: [skipped, standard, fixed] + +#### About mask mode + +A websocket client should mask the payload before sending it. + +With `mode=`(default mode), we use an empty mask key(0x00..0) to simply skip masking, which can also be detected by our server, and then skip unmasking. Other softwares(Nginx, Haproxy, CDNs..) can still correctly handle our data without knowing this trick. + +As for `mode=` or `mode=`, client will mask the payload data as normal. In `fixed` mode, client will use the same mask key for a unique websocket connection. While In `standard` mode, client will update the mask key between sending each frames. + ### TLS Options use `tls` to enable tls.