Open 3D Engine AzNetworking API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Classes | Public Types | Public Member Functions | List of all members
AzNetworking::TimeoutQueue Class Reference

class for managing timeout items. More...

#include <TimeoutQueue.h>


struct  TimeoutItem

Public Types

using TimeoutHandler = AZStd::function< TimeoutResult(TimeoutQueue::TimeoutItem &)>

Public Member Functions

void Reset ()
 Resets all internal state for this timeout queue.
TimeoutId RegisterItem (uint64_t userData, AZ::TimeMs timeoutMs)
TimeoutItemRetrieveItem (TimeoutId timeoutId)
void RemoveItem (TimeoutId timeoutId)
void UpdateTimeouts (const TimeoutHandler &timeoutHandler, int32_t maxTimeouts=-1)

Detailed Description

class for managing timeout items.

Member Typedef Documentation

◆ TimeoutHandler

Updates timeouts for all items, invokes the provided timeout functor if required.

timeoutHandlerlambda to invoke for all timeouts
maxTimeoutsthe maximum number of timeouts to process before breaking iteration

Member Function Documentation

◆ RegisterItem()

TimeoutId AzNetworking::TimeoutQueue::RegisterItem ( uint64_t  userData,
AZ::TimeMs  timeoutMs 

Registers a new item with the TimeoutQueue.

userDatavalue to register a timeout callback for
timeoutMsnumber of milliseconds to trigger the callback after
boolean true if registration was successful

◆ RemoveItem()

void AzNetworking::TimeoutQueue::RemoveItem ( TimeoutId  timeoutId)

Removes an item from the TimeoutQueue.

timeoutIdthe identifier of the item to remove

◆ RetrieveItem()

TimeoutItem* AzNetworking::TimeoutQueue::RetrieveItem ( TimeoutId  timeoutId)

Returns the provided timeout item if it exists, also refreshes the timeout value.

timeoutIdthe identifier of the item to fetch
pointer to the timeout item if it exists

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