Comments (9)
I tried to use Lua 5.3 in the x64-Version but failed, too:
-
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;
} -
However, this is not sufficient : The client of the test-server-copas.lua 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
from lua-websockets.
By requiring single modules you can circumvent auto require copas. e.g.
require('websockets.client_ev')
PRs welcome 👍
from lua-websockets.
copas
supports Lua 5.3 since 2.0.1. No PRs needed, at least not for copas
😉
The module that creates problem seems to be luabitop
. It would be great if we can conditionally drop that dependency for Lua > 5.1.
I can take a look at it when I will need 5.3 support, but this will take a couple of months.
from lua-websockets.
I just bumped into this issue. I guess I'll subscribe to this thread. Thanks.
from lua-websockets.
Hi there, I'm still stuck on this. Can anyone help? I was told 5.3 shouldn't need luabitop?
from lua-websockets.
I think for now it does not suppurt bit operations on Lua 5.3.
And because there no bit32
module I suggest use bit32 from luarocks. It works fine on Lua 5.3.
Or you can make PR to add support this. :)
from lua-websockets.
Would replacing bit.lua with this help?
https://github.com/daurnimator/lua-http/blob/master/http/bit.lua
from lua-websockets.
You also need shift operations. Checkou my variant.
https://github.com/moteus/lua-lluv-websocket/blob/master/src/lluv/websocket/bit.lua
from lua-websockets.
For bitop
, there is a fork from https://github.com/LuaDist/luabitop, which support Lua 5.3 (and provide bit.dll etc).
(And there is more forks from original luabitop)
But with further test, I get error attempt to call a nil value (global 'unpack')
at 'websocket\frame.lua', so means there is old incompatible Lua function.
Seems its easy to convert/update.. Replace unpack
to table.unpack
.
@FrankBuchholz Thank you for introduce https://github.com/daurnimator/lua-http (Dependency doesn't support Microsoft Windows operating systems).
from lua-websockets.
Related Issues (20)
- Can't install via luarocks HOT 1
- wss client connect error HOT 1
- copas looping issue while connecting the server
- How can I use lua-websockets with an socket.io server? HOT 1
- Need help on unity integration
- Compatibility with Lua 5.3? HOT 1
- luarocks outdated as hell
- Build error: Failed compiling object src/mime.obj HOT 2
- ERROR_NOT_ENOUGH_MEMORY
- Ive been wandering why didnt you guys set a heartbeat (ping pong)
- client:getpeername() but with websocket:client?
- websocket does not close when wlan/lan is disconnected. HOT 6
- Reserve `websocket.extension` name HOT 1
- How to handle authentication? HOT 2
- Sync receive check - masked or unmasked? HOT 2
- PING causes receive() problems HOT 10
- No way to pass Origin in sync client
- Support Message Fragmentation HOT 2
- Will this ever have SSL support for the server? HOT 2
- Add a license? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-websockets.