Exemplo n.º 1
0
        public SessionInfo GetSession(Unosquare.Net.WebSocketContext context)
#endif
        {
            lock (SessionsSyncLock)
            {
                if (context.CookieCollection[SessionCookieName] == null)
                {
                    return(null);
                }

                var cookieValue = context.CookieCollection[SessionCookieName].Value;
                return(this[cookieValue]);
            }
        }
Exemplo n.º 2
0
        public static SessionInfo GetSession(this Unosquare.Net.WebSocketContext context, WebServer server)
#endif
        {
            return(server.SessionModule?.GetSession(context));
        }