/// <summary>
        /// restore old sessionManager for recovered session. returns true if the session is restored, false if the old session doesn't exist thus cannot be restored.
        /// </summary>
        /// <param name="incomingSessionId">received sesion id information</param>
        /// <param name="newSessionManager">a new session manager</param>
        /// <returns>whether the session can be restored</returns>
        public bool RestoreContextManagerFromSessionId(string incomingSessionId, string newSessionId, BaseSessionManager newSessionManager)
        {
            WebSocketClientSessionManager oldSessionManager;
            lock(ClientSessionManagerMap)
            {
                ClientSessionManagerMap.TryGetValue(incomingSessionId, out oldSessionManager);
            }
            if (oldSessionManager == null)
            {
                return false;
            }
            //should restore any useful information from the oldsessionmanager to the new one. but what information? local scope?
            //1/16/2013 fei

            lock(ClientSessionManagerMap)
            {
                ClientSessionManagerMap.Remove(incomingSessionId);
            }
            return true;
        }
예제 #2
0
 public SessionHandle(BaseSessionManager sessionManager)
 {
     // TODO: Complete member initialization
     _sessionManager = sessionManager;
 }