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::UdpReliableQueue Class Reference

provides a reliability queue on top of the unreliable UDP connection layer. More...

#include <UdpReliableQueue.h>

Public Member Functions

SequenceId GetNextSequenceId ()
 
uint32_t GetQueueSize () const
 
bool PrepareForSend (PacketId packetId, SequenceId reliableSequenceId, const IPacket &packet)
 
bool OnPacketReceived (const UdpPacketHeader &header)
 
void OnPacketAcked (UdpNetworkInterface &networkInterface, UdpConnection &connection, PacketId packetId)
 
bool OnPacketLost (UdpNetworkInterface &networkInterface, UdpConnection &connection, PacketId packetId)
 

Detailed Description

provides a reliability queue on top of the unreliable UDP connection layer.

Member Function Documentation

◆ GetNextSequenceId()

SequenceId AzNetworking::UdpReliableQueue::GetNextSequenceId ( )

Returns the next sequence id for this generator instance.

Returns
the next sequence id for this generator instance

◆ GetQueueSize()

uint32_t AzNetworking::UdpReliableQueue::GetQueueSize ( ) const

Returns the number of unacked reliable messages still pending in the reliable queue.

Returns
the number of unacked reliable messages still pending in the reliable queue

◆ OnPacketAcked()

void AzNetworking::UdpReliableQueue::OnPacketAcked ( UdpNetworkInterface networkInterface,
UdpConnection connection,
PacketId  packetId 
)

Called when a packet is acked by the remote connection.

Parameters
networkInterfacereference to the network interface bound to the UdpConnection instance
connectionreference of the connection instance generating the event
packetIdpacket id of the acked packet

◆ OnPacketLost()

bool AzNetworking::UdpReliableQueue::OnPacketLost ( UdpNetworkInterface networkInterface,
UdpConnection connection,
PacketId  packetId 
)

Called when a packet is deemed lost by the remote connection.

Parameters
networkInterfacereference to the network interface bound to the UdpConnection instance
connectionreference of the connection instance generating the event
packetIdpacket id of the lost packet
Returns
boolean true if the packet was lost and no retry attempt was made, false otherwise

◆ OnPacketReceived()

bool AzNetworking::UdpReliableQueue::OnPacketReceived ( const UdpPacketHeader header)

Called when a reliable packet has been received.

Parameters
headerthe header for the received reliable packet

◆ PrepareForSend()

bool AzNetworking::UdpReliableQueue::PrepareForSend ( PacketId  packetId,
SequenceId  reliableSequenceId,
const IPacket packet 
)

Called when we're going to transmit a packet that we want to be reliable.

Parameters
packetIdpacket id of the packet we're sending
reliableSequenceIdthe reliable sequence identifier of the packet we're sending
packetreference to the packet being transmitted
Returns
boolean true on success, false on failure

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