Example #1
0
        private void OnSessionClosed(object sender, SessionEventArgs e)
        {
            var session = sender as IRconSession;
            if (session != null)
            {
                bool restartListening = Sessions.Count == MaxSessions;
                if (Sessions.Contains(session))
                {
                    Sessions.Remove(session);
                }

                if (restartListening)
                {
                    ListeningSocket.BeginAccept(SocketAcceptCallback, this.ListeningSocket);
                }
            }
        }
Example #2
0
 private void SessionOnClosed(object sender, SessionEventArgs sessionEventArgs)
 {
     InvokeSessionClosed(this);
 }