AuroraRuntime/Source/IO/Net/AuSocketStats.hpp
Reece Wilson 267c2216b0 [+] UDP over socket API via existing INetSrvDatagram layer
(...missing send)
[+] AuIO::Buffer::ViewReader
[+] AuIO::Buffer::ViewSeekableReadable
[+] AuIO::Buffer::ViewWriter
[*] Clean up AuCompression
[*[ AuLog messages must always crunch for memory
[*] Various bug fixes
[*] Refactor+clean up
2022-12-12 23:50:05 +00:00

33 lines
779 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuSocketStats.hpp
Date: 2022-12-06
Author: Reece
***/
#pragma once
#include <Aurora/Utility/ThroughputCalculator.hpp>
namespace Aurora::IO::Net
{
struct SocketStats : ISocketStats
{
void AddBytes(AuUInt32 uBytes);
virtual AuInt64 GetFirstTickTimeMS() override;
virtual AuInt64 GetLastTickTimeMS() override;
virtual AuUInt64 GetTotalBytesTransferred() override;
virtual double GetApproximatedThroughput() override;
AuUInt64 uLastTimeSteadyMS {};
private:
Utility::ThroughputCalculator calculator;
AuInt64 iFirstTime {};
AuInt64 iLastTime {};
AuUInt64 uTotalTransferred {};
};
}