using System;
using System.Runtime.InteropServices;
namespace Brutal.RakNetApi
{
[StructLayout(LayoutKind.Sequential)]
public unsafe partial struct RakNetStatistics
{
/// For each type in RNSPerSecondMetrics, what is the value over the last 1 second?
public fixed ulong ValueOverLastSecond[7];
/// For each type in RNSPerSecondMetrics, what is the total value over the lifetime of the connection?
public fixed ulong RunningTotal[7];
/// When did the connection start?
/// RakNet::GetTimeUS()
public ulong ConnectionStartTime;
/// Is our current send rate throttled by congestion control?This value should be true if you send more data per second than your bandwidth capacity
public Bool8 IsLimitedByCongestionControl;
/// If @a isLimitedByCongestionControl is true, what is the limit, in bytes per second?
public ulong BPSLimitByCongestionControl;
/// Is our current send rate throttled by a call to RakPeer::SetPerConnectionOutgoingBandwidthLimit()?
public Bool8 IsLimitedByOutgoingBandwidthLimit;
/// If @a isLimitedByOutgoingBandwidthLimit is true, what is the limit, in bytes per second?
public ulong BPSLimitByOutgoingBandwidthLimit;
/// For each priority level, how many messages are waiting to be sent out?
public fixed uint MessageInSendBuffer[4];
/// For each priority level, how many bytes are waiting to be sent out?
public fixed double BytesInSendBuffer[4];
/// How many messages are waiting in the resend buffer? This includes messages waiting for an ack, so should normally be a small valueIf the value is rising over time, you are exceeding the bandwidth capacity. See BPSLimitByCongestionControl
public uint MessagesInResendBuffer;
/// How many bytes are waiting in the resend buffer. See also messagesInResendBuffer
public ulong BytesInResendBuffer;
/// Over the last second, what was our packetloss? This number will range from 0.0 (for none) to 1.0 (for 100%)
public float PacketlossLastSecond;
/// What is the average total packetloss over the lifetime of the connection?
public float PacketlossTotal;
}
}