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; |