Software /
code /
prosody
File
core/sessionmanager.lua @ 36:62998e5319e3
Moved hosts to a config file, still need better config though
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 01 Oct 2008 22:11:28 +0100 |
parent | 30:bcf539295f2d |
child | 38:3fdfd6e0cb4e |
line wrap: on
line source
local tostring = tostring; local log = require "util.logger".init("sessionmanager"); module "sessionmanager" function new_session(conn) local session = { conn = conn, notopen = true, priority = 0, type = "c2s_unauthed" }; local w = conn.write; session.send = function (t) w(tostring(t)); end return session; end function send_to_session(session, data) log("debug", "Sending...", tostring(data)); session.conn.write(tostring(data)); end return _M;