Sockets for the rest of us (in LuaNode)
JavaScript Lua

README.md

LuaNode-Socket.IO

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.

Status

Currently, the only transports actively supported are websockets, flashsockets, xhr-multipart and xhr-polling, 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.

Installation

The easiest way to install is with LuaRocks.

You'll also need some Json library for Lua. LuaJSON or Json4Lua are recommended.

  • luarocks install json4lua

And also:

  • luarocks install luuid
  • luarocks install luabitop

If luuid gives you trouble to install (especially on MacOSX), you might try the following:

  • Download and extract e2fsprogs
  • cd e2fsprogs-1.41.12
  • ./configure
  • cd lib/uuid
  • make
  • ./tst_uuid
  • cp uuid.so /usr/local/lib/lua/5.1/

or read this post.

Documentation

The usage is the same as Socket.IO-node.

Example

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.

Acknowledgements

License

LuaNode-Socket.IO is available under the MIT license.