some unused fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-19 18:26:43 -07:00
parent 63cd3db956
commit cf6c7c4d8d
31 changed files with 28 additions and 82 deletions
@@ -64,7 +64,7 @@ namespace AzNetworking
{
--m_listenPortCount;
auto visitor = [this, &tcpNetworkInterface](ListenPort& listenPort)
auto visitor = [&tcpNetworkInterface](ListenPort& listenPort)
{
if (listenPort.m_tcpNetworkInterface == &tcpNetworkInterface)
{
@@ -120,7 +120,7 @@ namespace AzNetworking
auto readCallback = [this, newConnection, connectionLength](SocketFd socketFd)
{
auto visitor = [this, newConnection, connectionLength, socketFd](ListenPort& listenPort)
auto visitor = [this, newConnection, socketFd](ListenPort& listenPort)
{
if (listenPort.m_listenSocket.GetSocketFd() == socketFd)
{
@@ -132,7 +132,7 @@ namespace AzNetworking
auto writeCallback = [](SocketFd) {};
m_tcpSocketManager.ProcessEvents(updateRateMs, readCallback, writeCallback);
auto cleanupUnused = [this](AZ::ThreadSafeDeque<ListenPort>::DequeType& deque)
auto cleanupUnused = [](AZ::ThreadSafeDeque<ListenPort>::DequeType& deque)
{
AZStd::remove_if(deque.begin(), deque.end(), [](ListenPort& listenPort) { return listenPort.m_tcpNetworkInterface == nullptr; });
};
@@ -86,7 +86,7 @@ namespace AzNetworking
#if AZ_TRAIT_USE_OPENSSL
uint8_t encrpytedSendBuffer[MaxUdpTransmissionUnit];
// Write out the packet we were requested to send
const int32_t sentBytesRaw = SSL_write(dtlsEndpoint.m_sslSocket, data, size);
SSL_write(dtlsEndpoint.m_sslSocket, data, size);
const int32_t sentBytesEnc = BIO_read(dtlsEndpoint.m_writeBio, encrpytedSendBuffer, sizeof(encrpytedSendBuffer));
// Track encryption metrics
@@ -160,7 +160,6 @@ namespace AzNetworking
const AZ::TimeMs jitterMs = aznumeric_cast<AZ::TimeMs>(m_random.GetRandom()) % (connectionQuality.m_varianceMs > AZ::TimeMs{ 0 }
? connectionQuality.m_varianceMs
: AZ::TimeMs{ 1 });
const AZ::TimeMs currTimeMs = AZ::GetElapsedTimeMs();
const AZ::TimeMs deferTimeMs = (connectionQuality.m_latencyMs) + jitterMs;
DeferredData deferred = DeferredData(address, data, size, encrypt, dtlsEndpoint);
@@ -14,14 +14,14 @@
#include <AzNetworking/Utilities/Endian_Platform.h>
#if AZ_TRAIT_NEEDS_HTONLL
static const uint64_t htonll(uint64_t value)
const uint64_t htonll(uint64_t value)
{
const uint32_t hiValue = htonl(static_cast<uint32_t>(value >> 32));
const uint32_t loValue = htonl(static_cast<uint32_t>(value & 0x00000000FFFFFFFF));
return static_cast<uint64_t>(hiValue) << 32 | static_cast<uint64_t>(loValue);
}
static const uint64_t ntohll(uint64_t value)
const uint64_t ntohll(uint64_t value)
{
return htonll(value);
}