private void OnSessionOpen(BaseServerSession session, string address)
 {
     _ActiveSessions[address] = session;
     _ActiveSessionList       = _ActiveSessionList.ToList();
     _ActiveSessionList.Add(session);
     ConsoleSystem.Log($"[{address}] connected!");
 }
 private void OnSessionClose(BaseServerSession sender, SessionDisconnectEventArgs e)
 {
     _ActiveSessions.Remove(sender.RemoteIP.ToString());
     _ActiveSessionList = _ActiveSessionList.ToList();
     _ActiveSessionList.Remove(sender);
     ConsoleSystem.Log($"[{sender.RemoteIP}] disconnected!");
 }
        protected virtual BaseServerSession CreateSession(EndPoint client)
        {
            var session = new BaseServerSession();

            session.Disconnected += OnSessionClose;
            session.ServerInit(client);
            return(session);
        }