Software /
code /
prosody
File
core/sessionmanager.lua @ 35:3faa593c7e0f
Removed tag tip
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 01 Oct 2008 18:51:28 +0500 |
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;