Esempio n. 1
0
        private void Server_OnAccept(Guid obj)
        {
            //KKNetEngine.KKNet KKNet = new KKNetEngine.KKNet();
            //server.SetAttached(obj, KKNet);
            //Console.WriteLine($"Pull已连接{obj}");
            byte[] init_data = { 0x00, 0x01, 0x00, 0x01, 0x70, 0x06, 0x00, 0x00, 0x00, 0x01, 0x01 };
            // 引擎初始化
            server.InitKKNet(obj);
            server.Send(obj, init_data, 0, init_data.Length);

            CMD_MESSAGE_BOX cmd = new CMD_MESSAGE_BOX();

            byte[] cmd_data = cmd.SetText("0\n欢迎进入KK开发服\nhttps://github.com/hnhhzy/KKGame\n", 0x19);
            server.Send(obj, cmd_data, 0, cmd_data.Length);
        }