2023-11-29 13:55:01 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: AuNetSocketServerLimits.cpp
|
|
|
|
Date: 2023-11-29
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#include "Networking.hpp"
|
|
|
|
#include "AuNetSocketServerLimits.hpp"
|
|
|
|
|
|
|
|
namespace Aurora::IO::Net
|
|
|
|
{
|
|
|
|
void NetSocketServerLimits::NotifyChildRemoved()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::GetMaxConnectionsPerIp()
|
|
|
|
{
|
|
|
|
return this->optMaxConnectionsPerIp;
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::SetMaxConnectionsPerIp(AuOptional<AuUInt32> optNextValue)
|
|
|
|
{
|
|
|
|
return AuExchange(this->optMaxConnectionsPerIp, optNextValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::GetMaxConnections()
|
|
|
|
{
|
|
|
|
return this->optMaxConnections;
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::SetMaxConnections(AuOptional<AuUInt32> optNextValue)
|
|
|
|
{
|
|
|
|
return AuExchange(this->optMaxConnections, optNextValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
AuList<IPAddress> NetSocketServerLimits::GetWhitelist()
|
|
|
|
{
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
|
|
void NetSocketServerLimits::SetWhitelist(AuList<IPAddress> whitelist)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
AuList<IPAddress> NetSocketServerLimits::GetBlacklist()
|
|
|
|
{
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
|
|
void NetSocketServerLimits::SetBlacklist(AuList<IPAddress> blacklist)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::GetBeforeDDoSDCAverageThroughputLimit()
|
|
|
|
{
|
|
|
|
return this->optBeforeDDoSDCAverageThroughputLimit;
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::SetBeforeDDoSDCAverageThroughputLimit(AuOptional<AuUInt32> optNextValue)
|
|
|
|
{
|
|
|
|
return AuExchange(this->optBeforeDDoSDCAverageThroughputLimit, optNextValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::GetBeforeDDoSDCFrameTimeMS()
|
|
|
|
{
|
|
|
|
return this->optBeforeDDoSDCFrameTimeMS;
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::SetBeforeDDoSDCFrameTimeMS(AuOptional<AuUInt32> optNextValue)
|
|
|
|
{
|
|
|
|
return AuExchange(this->optBeforeDDoSDCFrameTimeMS, optNextValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::GetBeforeDDoSTickFrameLimitCount()
|
|
|
|
{
|
|
|
|
return this->optBeforeDDoSTickFrameLimitCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::SetBeforeDDoSTickFrameLimitCount(AuOptional<AuUInt32> optNextValue)
|
|
|
|
{
|
|
|
|
return AuExchange(this->optBeforeDDoSTickFrameLimitCount, optNextValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::GetBeforeDDoSTickFrameTimeMS()
|
|
|
|
{
|
|
|
|
return this->optBeforeDDoSTickFrameTimeMS;
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::SetBeforeDDoSTickFrameTimeMS(AuOptional<AuUInt32> optNextValue)
|
|
|
|
{
|
|
|
|
return AuExchange(this->optBeforeDDoSTickFrameTimeMS, optNextValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<bool> NetSocketServerLimits::GetAutoBanOnDDoSDetectA()
|
|
|
|
{
|
|
|
|
return this->optAutoBanOnDDoSDetectA;
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<bool> NetSocketServerLimits::SetAutoBanOnDDoSDetectA(AuOptional<bool> optNextValue)
|
|
|
|
{
|
|
|
|
return AuExchange(this->optAutoBanOnDDoSDetectA, optNextValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::GetAutoBanTimeSecs()
|
|
|
|
{
|
2023-12-04 21:11:32 +00:00
|
|
|
return this->optAutoBanTimeSecs;
|
2023-11-29 13:55:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
AuOptional<AuUInt32> NetSocketServerLimits::SetAutoBanTimeSecs(AuOptional<AuUInt32> optNextValue)
|
|
|
|
{
|
2023-12-04 21:11:32 +00:00
|
|
|
return AuExchange(this->optAutoBanTimeSecs, optNextValue);
|
2023-11-29 13:55:01 +00:00
|
|
|
}
|
|
|
|
}
|