Sockets for the rest of us (in LuaNode).
LuaNode-Socket.IO is a Socket.IO server for LuaNode. It's currently only compatible with Socket.IO v0.7pre, so it is not ready for prime-time yet.
Currently, the only transports actively supported are websockets and flashsockets, and the server is only compatible with v0.7pre clients. The other transports are disabled by default because they are a bit unstable at the moment. I'll add proper support for them soon and eventually add support for v0.6 clients.
The easiest way to install is with LuaRocks.
- luarocks install https://github.com/ignacio/LuaNode-Socket.IO/raw/master/rockspecs/lnsocketio-github-1.rockspec
You'll also need some Json library for Lua. LuaJSON or Json4Lua are recommended.
- luarocks install json4lua
And also:
- luarocks install luasocket
- luarocks install luuid
- luarocks install bitop
Also, LuaCrypto is needed, but the version here. You'll need CMake to build it and then you need to copy the resulting library to Lua's path.
The usage is the same as Socket.IO-node.
See the included file test.lua
. Once properly installed, you'd be able to do:
git clone git://github.com/ignacio/LuaNode-Socket.IO.git lnsocket-io
cd lnsocket-io/
sudo luanode test.lua
And then point your browser to http://localhost:8080
.
LuaNode-Socket.IO is available under the MIT license.