示例#1
0
        public static void OnAsyncConnected(object obj)
        {
            Debug.Assert(null != obj);
            Debug.Assert(obj is GatewayServer);

            GatewayServer gate_server = obj as GatewayServer;

            gate_server.SendAuthPacket();
            gate_server.StartSendAsync();
        }
        public static int PacketProcessAuth(object obj, Packet pkt)
        {
            Debug.Assert(null != obj);
            Debug.Assert(obj is GatewayServer);
            Debug.Assert(Protocol.GS_GW_AUTH == pkt.GetPacketID());

            GatewayServer gate_server = obj as GatewayServer;

            uint game_server_id = pkt.GetUint();

            Debug.Assert(ConfigManager.Instance.GAME_SERVER_ID == game_server_id);

            LogManager.Info("Receive auth packet: Game server ID = " + game_server_id.ToString());

            return((int)PacketProcessManager.PACKET_PROC_ERROR.SUCCESS);
        }
 public GatewayServerManager()
 {
     m_GatewayServer = new GatewayServer();
 }