示例#1
0
    static void Main(string[] args)
    {
        NetworkDebuger.IsUnity    = false;
        NetworkDebuger.EnableLog  = true;
        NetworkDebuger.EnableSave = true;
        NetworkDebuger.DeleteFiles();
        NetworkDebuger.Log(nameof(NetworkDebuger) + " Init");



        //
        SqlManager.Init();
        ServerDataManager.Init();
        new AsyncIOCPServer(IP, portTCP, 30000);
        UdpServer.Instance.Init(IP, portUDP);


        while (true)
        {
            string msg = Console.ReadLine();
            if (msg.Contains("quit"))//quit-1-1
            {
                string[] sp     = msg.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries);
                int      roomID = int.Parse(sp[1]);
                int      unique = int.Parse(sp[2]);

                bool isQuit = ServerDataManager.instance.allRoom.RoomList[roomID].Quit(unique);
                Console.WriteLine("踢房间->" + roomID + " 站位->" + unique + " 结果->" + isQuit);
            }
            if (msg == "test")
            {
            }
        }
    }