Software /
code /
prosody
Comparison
core/sessionmanager.lua @ 99:ba08b8a4eeef
Abstract connections with "connection listeners"
- Added connlistener for xmppclient
- SASL/TLS now use a new session:reset_stream() method
- main.lua on its way to being a bit neater
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 17:36:21 +0100 |
parent | 77:531b981f2d17 |
child | 118:76ac96c53ee5 |
comparison
equal
deleted
inserted
replaced
98:3a2d327c4856 | 99:ba08b8a4eeef |
---|---|
18 local getmetatable = getmetatable; | 18 local getmetatable = getmetatable; |
19 | 19 |
20 module "sessionmanager" | 20 module "sessionmanager" |
21 | 21 |
22 function new_session(conn) | 22 function new_session(conn) |
23 local session = { conn = conn, notopen = true, priority = 0, type = "c2s_unauthed" }; | 23 local session = { conn = conn, priority = 0, type = "c2s_unauthed" }; |
24 if true then | 24 if true then |
25 session.trace = newproxy(true); | 25 session.trace = newproxy(true); |
26 getmetatable(session.trace).__gc = function () print("Session got collected") end; | 26 getmetatable(session.trace).__gc = function () print("Session got collected") end; |
27 end | 27 end |
28 local w = conn.write; | 28 local w = conn.write; |