lipp / lua-websockets

Websockets for Lua.

Home Page:http://lipp.github.com/lua-websockets/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compatibility with Lua 5.3?

jeffmikels opened this issue · comments

I need to use Lua 5.3, but lua-websockets depends on luabitop which can't work with 5.3.

What are my options?

I tried to use Lua 5.3 in the x64-Version but failed, too:

  1. I could solve the issue about bit.lua by creating my own (incomplete) file which basically wraps built-in operators from Lua 5.3 into functions::
    return {
    band = function(a, b) return a & b end;
    bor = function(a, b) return a | b end;
    bxor = function(a, b) return a ~ b end;
    bnot = function(x) return ~ x end;
    lshift = function(x, n) return x << n end;
    rshift = function(x, n) return x >> n end;
    arshift = function(x, n) print('arshift missing') return x end;
    rol = function(x, n) return (x<<(n%64))|(x>>(64-(n%64))) end;
    ror = function(x, n) return (x>>(n%64))|(x<<(64-(n%64))) end;
    bswap = function(x) print('bswap missing') return x end;
    }

  2. However, this is not sufficient : The client of the test-server-copas still reports the error "Error during WebSocket handshake: Incorrect 'Sec-WebSocket-Accept' header value"

Now I'm looking for different libraries like https://github.com/daurnimator/lua-http