/// <summary> /// ping网络 /// </summary> private void OnPingNet(PacketBase packet) { gl2ss.PingNet msg = packet as gl2ss.PingNet; ss2c.PingNet rep_msg = PacketPools.Get(ss2c.msg.PING_NET) as ss2c.PingNet; rep_msg.packet_id = msg.packet_id; rep_msg.tick = msg.tick; rep_msg.flags = msg.flags; ServerNetManager.Instance.SendProxy(msg.client_uid, rep_msg); }
/// <summary> /// ping网络 /// </summary> private void OnPingNet(PacketBase packet) { ss2gl.PingNet msg = packet as ss2gl.PingNet; long offset_time = Time.time - msg.tick; Log.Debug("收到第:" + msg.packet_id + " 时间:" + Time.time + " 延迟:" + offset_time); gl2ss.PingNet rep_msg = PacketPools.Get(gl2ss.msg.PING_NET) as gl2ss.PingNet; rep_msg.client_uid = msg.client_uid; rep_msg.packet_id = msg.packet_id; rep_msg.tick = msg.tick; rep_msg.flags = msg.flags; ForServerNetManager.Instance.Send(msg.server_uid.ss_uid, rep_msg); }