Comparison

util/session.lua @ 6938:9df70e9e006b

util.session: What is the identity of a session?
author Kim Alvefur <zash@zash.se>
date Tue, 24 Nov 2015 19:09:51 +0100
parent 6937:f5d2e58fbefa
child 6939:a9ae0c6ac4f4
comparison
equal deleted inserted replaced
6937:f5d2e58fbefa 6938:9df70e9e006b
4 type = typ .. "_unauthed"; 4 type = typ .. "_unauthed";
5 }; 5 };
6 return session; 6 return session;
7 end 7 end
8 8
9 local function set_id(session)
10 local id = typ .. tostring(session):match("%x+$"):lower();
11 session.id = id;
12 return session;
13 end
14
9 return { 15 return {
10 new = new_session; 16 new = new_session;
17 set_id = set_id;
11 } 18 }