WebSocket server using LuaSocket
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
www
README
ajaxsocketconn.lua
digest.lua
gettimeofday.lua
server.lua
simpleconn.lua
websocketconn.lua
websockethixieconn.lua

README

WebSocket server for Lua
uses the following:
LuaSocket
LuaCrypto
LuaBitOp
dkjson
my Lua ext library
my ThreadManager library

Timer is currently based on gettimeofday, which is loaded via LuaJIT's FFI, 
but if you wish to use non-FFI Lua you can use the l_gettimeofday lua binding function
(or even os.clock or os.time if you don't mind the resolution).

Also provides an AJAX fallback, but some specific client code must be used with this.

To recieve messages, override the Server class 
Ex:
local MyServer = class(require 'websocket.server')

To send messages, override the SimpleConn class and assign the new class to the server's connClass member.
Ex:
MyConn = class(require 'websocket.simpleconn')
MyServer.connClass = MyConn