2022-12-06 22:53:37 +00:00
|
|
|
/***
|
|
|
|
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;
|
|
|
|
|
2022-12-12 23:50:05 +00:00
|
|
|
AuUInt64 uLastTimeSteadyMS {};
|
2022-12-06 22:53:37 +00:00
|
|
|
private:
|
2023-09-28 14:42:09 +00:00
|
|
|
Aurora::Utility::ThroughputCalculator calculator;
|
2022-12-06 22:53:37 +00:00
|
|
|
AuInt64 iFirstTime {};
|
|
|
|
AuInt64 iLastTime {};
|
|
|
|
AuUInt64 uTotalTransferred {};
|
|
|
|
};
|
|
|
|
}
|