net/websocket/frames.lua
changeset 12978 ba409c67353b
parent 12390 2d3080d02960
child 13254 cfd062d025b0
equal deleted inserted replaced
12977:cc215923297f 12978:ba409c67353b
     4 --
     4 --
     5 -- This project is MIT/X11 licensed. Please see the
     5 -- This project is MIT/X11 licensed. Please see the
     6 -- COPYING file in the source package for more information.
     6 -- COPYING file in the source package for more information.
     7 --
     7 --
     8 
     8 
     9 local random_bytes = require "util.random".bytes;
     9 local random_bytes = require "prosody.util.random".bytes;
    10 
    10 
    11 local bit = require "util.bitcompat";
    11 local bit = require "prosody.util.bitcompat";
    12 local band = bit.band;
    12 local band = bit.band;
    13 local bor = bit.bor;
    13 local bor = bit.bor;
    14 local sbit = require "util.strbitop";
    14 local sbit = require "prosody.util.strbitop";
    15 local sxor = sbit.sxor;
    15 local sxor = sbit.sxor;
    16 
    16 
    17 local s_char = string.char;
    17 local s_char = string.char;
    18 local s_pack = require"util.struct".pack;
    18 local s_pack = require"prosody.util.struct".pack;
    19 local s_unpack = require"util.struct".unpack;
    19 local s_unpack = require"prosody.util.struct".unpack;
    20 
    20 
    21 local function pack_uint16be(x)
    21 local function pack_uint16be(x)
    22 	return s_pack(">I2", x);
    22 	return s_pack(">I2", x);
    23 end
    23 end
    24 local function pack_uint64be(x)
    24 local function pack_uint64be(x)