Beispiel #1
0
        private void CloseSession(TcpSocketSession session)
        {
            TcpSocketSession sessionToBeThrowAway;

            _sessions.TryRemove(session.SessionKey, out sessionToBeThrowAway);

            session?.Close();// parent server close session
        }
Beispiel #2
0
        public void CloseSession(string sessionKey)
        {
            TcpSocketSession session = null;

            if (_sessions.TryGetValue(sessionKey, out session))
            {
                session.Close(); // parent server close session by session-key
            }
        }