Пример #1
0
        void session_Closed(object sender, SocketSessionClosedEventArgs e)
        {
            m_MaxConnectionSemaphore.Release();

            IAsyncSocketSession socketSession = sender as IAsyncSocketSession;

            if (socketSession != null && this.m_ReadWritePool != null)
            {
                this.m_ReadWritePool.Push(socketSession.SocketAsyncProxy);
            }
        }
Пример #2
0
        void socketSession_Closed(object sender, SocketSessionClosedEventArgs e)
        {
            //the sender is a sessionID
            string sessionID = e.SessionID;

            if (string.IsNullOrEmpty(sessionID))
            {
                return;
            }

            try
            {
                lock (m_SessionSyncRoot)
                {
                    m_SessionDict.Remove(sessionID);
                }
                LogUtil.LogInfo(this, "SocketSession " + sessionID + " was closed!");
            }
            catch (Exception exc)
            {
                LogUtil.LogError(this, exc);
            }
        }
Пример #3
0
 void SocketSession_Closed(object sender, SocketSessionClosedEventArgs e)
 {
     OnClosed();
 }
Пример #4
0
 void session_Closed(object sender, SocketSessionClosedEventArgs e)
 {
     m_MaxConnectionSemaphore.Release();
 }