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.
Public Types | Public Member Functions | List of all members
AzNetworking::TcpSocketManager Class Reference

internal helper implementation that manages basic details related to handling large numbers of TCP sockets efficiently. More...

#include <TcpSocketManager.h>

Public Types

using SocketEventCallback = AZStd::function< void(SocketFd)>
 

Public Member Functions

bool AddSocket (SocketFd socketFd)
 
bool ClearSocket (SocketFd socketFd)
 
void ProcessEvents (AZ::TimeMs maxBlockMs, const SocketEventCallback &readCallback, const SocketEventCallback &writeCallback)
 

Detailed Description

internal helper implementation that manages basic details related to handling large numbers of TCP sockets efficiently.

Member Function Documentation

◆ AddSocket()

bool AzNetworking::TcpSocketManager::AddSocket ( SocketFd  socketFd)

Adds the provided socket to the internal socket management mechanism.

Parameters
socketFdthe socket file descriptor to add
Returns
boolean true on success, false otherwise

◆ ClearSocket()

bool AzNetworking::TcpSocketManager::ClearSocket ( SocketFd  socketFd)

Removes the requested socket from the internal socket management mechanism.

Parameters
socketFdthe socket file descriptor to remove
Returns
boolean true on success, false otherwise

◆ ProcessEvents()

void AzNetworking::TcpSocketManager::ProcessEvents ( AZ::TimeMs  maxBlockMs,
const SocketEventCallback &  readCallback,
const SocketEventCallback &  writeCallback 
)

Processes any pending events for the set of sockets currently managed by this instance.

Parameters
maxBlockMsthe maximum milliseconds to block while gathering events
readCallbackfunctor to invoke if a socket has pending data to read
writeCallbackfunctor to invoke if a socket is ready for writing

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