aboutsummaryrefslogtreecommitdiffstats
path: root/net/websocket
diff options
context:
space:
mode:
Diffstat (limited to 'net/websocket')
-rw-r--r--net/websocket/frames.lua11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/websocket/frames.lua b/net/websocket/frames.lua
index 6a088902..c22a12de 100644
--- a/net/websocket/frames.lua
+++ b/net/websocket/frames.lua
@@ -6,17 +6,17 @@
-- COPYING file in the source package for more information.
--
-local random_bytes = require "util.random".bytes;
+local random_bytes = require "prosody.util.random".bytes;
-local bit = require "util.bitcompat";
+local bit = require "prosody.util.bitcompat";
local band = bit.band;
local bor = bit.bor;
-local sbit = require "util.strbitop";
+local sbit = require "prosody.util.strbitop";
local sxor = sbit.sxor;
local s_char = string.char;
-local s_pack = require"util.struct".pack;
-local s_unpack = require"util.struct".unpack;
+local s_pack = require"prosody.util.struct".pack;
+local s_unpack = require"prosody.util.struct".unpack;
local function pack_uint16be(x)
return s_pack(">I2", x);
@@ -77,7 +77,6 @@ local function parse_frame_header(frame)
end
-- XORs the string `str` with the array of bytes `key`
--- TODO: optimize
local function apply_mask(str, key, from, to)
return sxor(str:sub(from or 1, to or -1), key);
end