Open 3D Engine AzNetworking API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzNetworking::UdpPacketIdWindow Class Reference

Wrapper class that handles management of ack status for a large range of packet id's. More...

#include <UdpPacketIdWindow.h>

Public Types

using PacketAckContainer = RingbufferBitset< PacketWindowAckCount >
 

Public Member Functions

void Reset ()
 Resets the packet ack window, putting it back into a default initialized state.
 
PacketAckState GetPacketAckStatus (PacketId packetId) const
 
SequenceId GetHeadSequenceId () const
 
SequenceRolloverCount GetSequenceRolloverCount () const
 
BitsetChunk & GetMostRecentAckState (BitsetChunk &outWindow) const
 
const PacketAckContainerGetPacketAckContainer () const
 
bool UpdateForReceivedPacket (UdpPacketHeader &header)
 
void UpdateForRemoteAckStatus (UdpConnection *connection, UdpPacketHeader &header)
 
void PrintStatus () const
 Prints the most recent ack window status to the Logger.
 

Static Public Attributes

static const uint32_t PacketWindowAckCount = 16384
 

Detailed Description

Wrapper class that handles management of ack status for a large range of packet id's.

Member Function Documentation

◆ GetHeadSequenceId()

SequenceId AzNetworking::UdpPacketIdWindow::GetHeadSequenceId ( ) const
inline

Returns the latest known SequenceId managed by this UdpPacketIdWindow instance.

Returns
the latest known SequenceId managed by this UdpPacketIdWindow instance

◆ GetMostRecentAckState()

BitsetChunk & AzNetworking::UdpPacketIdWindow::GetMostRecentAckState ( BitsetChunk &  outWindow) const

Returns the latest ack vector contained in this UdpPacketIdWindow.

Parameters
outWindowthe window to store the most recent ack state in
Returns
reference to the window where the ack vector was stored

◆ GetPacketAckContainer()

const UdpPacketIdWindow::PacketAckContainer & AzNetworking::UdpPacketIdWindow::GetPacketAckContainer ( ) const
inline

Returns the underlying packet ack container used for retaining packet ack status.

Returns
the underlying packet ack container used for retaining packet ack status

◆ GetPacketAckStatus()

PacketAckState AzNetworking::UdpPacketIdWindow::GetPacketAckStatus ( PacketId  packetId) const

Retrieves the latest ack status for a given PacketId.

Parameters
packetIdthe identifier of the packet to lookup the latest ack status of
Returns
the current status for the given PacketId

◆ GetSequenceRolloverCount()

SequenceRolloverCount AzNetworking::UdpPacketIdWindow::GetSequenceRolloverCount ( ) const
inline

Returns the SequenceRolloverCount for the number of times the sequence ids have rolled over.

Returns
the number of times the sequence ids have rolled over

◆ UpdateForReceivedPacket()

bool AzNetworking::UdpPacketIdWindow::UpdateForReceivedPacket ( UdpPacketHeader header)

Updates the internal ack state for the newly received PacketId.

Parameters
headerthe packet header received to process
Returns
boolean false if updating failed, and the packet should be discarded without further processing

◆ UpdateForRemoteAckStatus()

void AzNetworking::UdpPacketIdWindow::UpdateForRemoteAckStatus ( UdpConnection connection,
UdpPacketHeader header 
)

Updates the internal ack state to replicate the received remote ack status.

Parameters
connectionthe connection this packet was received on, used for ack callbacks
headerthe packet header received to process

The documentation for this class was generated from the following files: