Exemplo n.º 1
0
        /// <summary>
        /// 压力测试
        /// </summary>
        private void OnRobotTest(PacketBase packet)
        {
            gs2ss.RobotTest msg = packet as gs2ss.RobotTest;

            ss2gs.RobotTest rep_msg = PacketPools.Get(ss2gs.msg.ROBOT_TEST) as ss2gs.RobotTest;
            rep_msg.client_uid = msg.client_uid;
            rep_msg.length     = msg.length;
            this.Send(rep_msg);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 压力测试
 /// </summary>
 private void OnClientRobotTest(ClientSession session, PacketBase packet)
 {
     c2gs.RobotTest msg = packet as c2gs.RobotTest;
     if (Utils.HasFlag(msg.flags, (uint)eServerType.WORLD))
     {
         gs2ws.RobotTest rep_msg = PacketPools.Get(gs2ws.msg.ROBOT_TEST) as gs2ws.RobotTest;
         rep_msg.client_uid = session.client_uid;
         rep_msg.length     = msg.length;
         ServerNetManager.Instance.Send2WS(rep_msg);
     }
     if (Utils.HasFlag(msg.flags, (uint)eServerType.SERVER))
     {
         gs2ss.RobotTest rep_msg = PacketPools.Get(gs2ss.msg.ROBOT_TEST) as gs2ss.RobotTest;
         rep_msg.client_uid = session.client_uid;
         rep_msg.length     = msg.length;
         session.Send2SS(rep_msg);
     }
     if (msg.flags == 0 || Utils.HasFlag(msg.flags, (uint)eServerType.GATE))
     {
         gs2c.RobotTest rep_msg = PacketPools.Get(gs2c.msg.ROBOT_TEST) as gs2c.RobotTest;
         rep_msg.length = msg.length;
         session.Send(rep_msg);
     }
 }