Software /
code /
prosody
Annotate
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 |
rev | line source |
---|---|
30 | 1 |
2 local tostring = tostring; | |
3 | |
4 local log = require "util.logger".init("sessionmanager"); | |
5 | |
6 module "sessionmanager" | |
7 | |
8 function new_session(conn) | |
9 local session = { conn = conn, notopen = true, priority = 0, type = "c2s_unauthed" }; | |
10 local w = conn.write; | |
11 session.send = function (t) w(tostring(t)); end | |
12 return session; | |
13 end | |
14 | |
15 function send_to_session(session, data) | |
16 log("debug", "Sending...", tostring(data)); | |
17 session.conn.write(tostring(data)); | |
18 end | |
19 | |
20 return _M; |