net.websocket: Make data masking configurable

This commit is contained in:
Florian Zeitz 2014-09-26 22:12:21 +02:00
parent 65b12619a3
commit 89a01cc8d9
2 changed files with 3 additions and 3 deletions

View file

@ -171,7 +171,7 @@ local function parse_close(data)
return code, message
end
local function build_close(code, message)
local function build_close(code, message, mask)
local data = pack_uint16be(code);
if message then
assert(#message<=123, "Close reason must be <=123 bytes");
@ -180,7 +180,7 @@ local function build_close(code, message)
return build_frame({
opcode = 0x8;
FIN = true;
MASK = true;
MASK = mask;
data = data;
});
end