using System; namespace axXez.TS3.Protocol { /// Instance-level runtime stats returned by hostinfo: uptime, virtual server counts, and aggregate bandwidth. public class HostInfo : TsEntity, INetworkStats { /// Time the TeamSpeak server instance has been running since last start, in seconds. [TsField("instance_uptime")] public int UptimeSeconds { get; protected set; } /// Time the TeamSpeak server instance has been running since last start. public TimeSpan Uptime => TimeSpan.FromSeconds(UptimeSeconds); /// Current UTC date and time on the host machine. [TsField("host_timestamp_utc")] public DateTime HostTime { get; protected set; } /// Number of virtual servers currently running on this instance. [TsField("virtualservers_running_total")] public int NumberOfRunningVirtualServers { get; protected set; } /// Sum of max clients across all running virtual servers. [TsField("virtualservers_total_maxclients")] public int TotalMaxClientsOnVirtualServers { get; protected set; } /// Total number of clients currently connected across all running virtual servers. [TsField("virtualservers_total_clients_online")] public int OnlineClientsOnVirtualServers { get; protected set; } /// Total number of channels currently existing across all running virtual servers. [TsField("virtualservers_total_channels_online")] public int TotalChannelsOnVirtualServers { get; protected set; } /// Current outgoing file transfer bandwidth in bytes per second. [TsField("connection_filetransfer_bandwidth_sent")] public int CurrentOutgoingFileTransferBandwidth { get; protected set; } /// Current incoming file transfer bandwidth in bytes per second. [TsField("connection_filetransfer_bandwidth_received")] public int CurrentIncomingFileTransferBandwidth { get; protected set; } /// Total bytes sent via file transfer across all time. [TsField("connection_filetransfer_bytes_sent_total")] public long TotalFileTransferBytesSent { get; protected set; } /// Total bytes received via file transfer across all time. [TsField("connection_filetransfer_bytes_received_total")] public long TotalFileTransferBytesReceived { get; protected set; } /// Total number of UDP packets sent by the instance. [TsField("connection_packets_sent_total")] public long PacketsSent { get; protected set; } /// Total number of UDP packets received by the instance. [TsField("connection_packets_received_total")] public long PacketsReceived { get; protected set; } /// Total bytes sent by the instance across all traffic types. [TsField("connection_bytes_sent_total")] public long BytesSent { get; protected set; } /// Total bytes received by the instance across all traffic types. [TsField("connection_bytes_received_total")] public long BytesReceived { get; protected set; } /// Average outgoing bandwidth in bytes per second over the last second. [TsField("connection_bandwidth_sent_last_second_total")] public int LastSecondAvgOutgoingBandwidth { get; protected set; } /// Average incoming bandwidth in bytes per second over the last second. [TsField("connection_bandwidth_received_last_second_total")] public int LastSecondAvgIncomingBandwidth { get; protected set; } /// Average outgoing bandwidth in bytes per second over the last minute. [TsField("connection_bandwidth_sent_last_minute_total")] public int LastMinuteAvgOutgoingBandwidth { get; protected set; } /// Average incoming bandwidth in bytes per second over the last minute. [TsField("connection_bandwidth_received_last_minute_total")] public int LastMinuteAvgIncomingBandwidth { get; protected set; } internal HostInfo(TsDataEntry data) : base(data) { } } }