Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="client"></param>
        protected override void OnClientConnected(AuthClient client)
        {
            Logger.Debug("Connected : " + client.Ip);

            AddMessage(() =>
            {
                if (base.Clients.Count() >= AuthMaxClient)
                {
                    client.Send(AuthMessage.SERVER_BUSY());
                    client.Disconnect();
                }
                else
                {
                    client.FrameManager.AddFrame(VersionFrame.Instance);
                    client.AuthKey = Util.AuthKeyPool.Pop();
                    client.Send(AuthMessage.HELLO_CONNECT(client.AuthKey));
                }
            });
        }