/// <summary> /// 压力测试 /// </summary> /// <param name="packet"></param> private void OnRobotTest(PacketBase packet) { ss2gs.RobotTest msg = packet as ss2gs.RobotTest; gs2c.RobotTest rep_msg = PacketPools.Get(gs2c.msg.ROBOT_TEST) as gs2c.RobotTest; rep_msg.length = msg.length; ForClientNetManager.Instance.Send(msg.client_uid.conn_idx, rep_msg); }
/// <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); } }