From 40f592ecf0d56591183a1b18ba7d7a0ba5fa87cf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 24 Nov 2015 19:26:27 +0100 Subject: util.session: How does a session relate do a connection? --- util/session.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'util') diff --git a/util/session.lua b/util/session.lua index 7703c265..03ddcf47 100644 --- a/util/session.lua +++ b/util/session.lua @@ -19,8 +19,15 @@ local function set_logger(session) return session; end +local function set_conn(session, conn) + session.conn = conn; + session.ip = conn:ip(); + return session; +end + return { new = new_session; set_id = set_id; set_logger = set_logger; + set_conn = set_conn; } -- cgit v1.2.3