Comparison

core/s2smanager.lua @ 2748:85a242cd1bc4

s2smanager: Add open_stream and close methods to resting sessions
author Matthew Wild <mwild1@gmail.com>
date Sun, 14 Mar 2010 02:56:57 +0000
parent 2747:168104895051
child 2749:8dc5f3651501
comparison
equal deleted inserted replaced
2747:168104895051 2748:85a242cd1bc4
509 end 509 end
510 end 510 end
511 511
512 local resting_session = { -- Resting, not dead 512 local resting_session = { -- Resting, not dead
513 destroyed = true; 513 destroyed = true;
514 open_stream = function (session)
515 session.log("debug", "Attempt to open stream on resting session");
516 end;
517 close = function (session)
518 session.log("debug", "Attempt to close already-closed session");
519 end;
514 }; resting_session.__index = resting_session; 520 }; resting_session.__index = resting_session;
515 521
516 function retire_session(session) 522 function retire_session(session)
517 local log = session.log or log; 523 local log = session.log or log;
518 for k in pairs(session) do 524 for k in pairs(session) do