using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SDL2Demo.Net { public class IpPerformanceInfo { public long TotalPackets; public long PacketsSinceSecond; public long PacketsPerSecond; public long TotalBytes; public long BytesSinceSecond; public long BytesPerSecond; public string SourceResolution; public string DestinationResolution; public void UpdatePerSeconds() { PacketsPerSecond = PacketsSinceSecond; PacketsSinceSecond = 0; BytesPerSecond = BytesSinceSecond; BytesSinceSecond = 0; } public void CountPacket(int len) { TotalPackets++; PacketsSinceSecond++; TotalBytes += len; BytesSinceSecond += len; } } }