Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Lua 5.3? #107

Open
jeffmikels opened this issue Jan 16, 2018 · 1 comment
Open

Compatibility with Lua 5.3? #107

jeffmikels opened this issue Jan 16, 2018 · 1 comment

Comments

@jeffmikels
Copy link

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

What are my options?

@FrankBuchholz
Copy link

FrankBuchholz commented Sep 30, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants