Top Level Namespace

Defined Under Namespace

Modules: SinatraSockets Classes: Routes, Server

Constant Summary collapse

Sockets =

In leue of sessions, three global objects are used:

Users: <Hash> with keys: <username> and vals: <Set(token)>
AuthenticatedTokens: <hash> with keys: <token> and vals: <username>
Sockets: <hash> with keys: <token> and vals: <socket>
{}
AuthenticatedTokens =
{}
Users =
Hash.new { |hash, key| hash[key] = Set.new }