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 Member Functions | List of all members
AzNetworking::TcpListenThread Class Referencefinal

A class for managing a TCP listen socket and accepting new incoming connections. More...

#include <TcpListenThread.h>

Inherits AzNetworking::TimedThread.

Public Member Functions

bool Listen (TcpNetworkInterface &tcpNetworkInterface)
 
bool StopListening (TcpNetworkInterface &tcpNetworkInterface)
 
uint32_t GetSocketCount () const
 
AZ::TimeMs GetUpdateTimeMs () const
 
- Public Member Functions inherited from AzNetworking::TimedThread
 TimedThread (const char *name, AZ::TimeMs updateRate)
 
void Start ()
 Starts the thread.
 
void Stop ()
 Stops the thread.
 
void Join ()
 Joins the thread.
 
bool IsRunning () const
 

Additional Inherited Members

Detailed Description

A class for managing a TCP listen socket and accepting new incoming connections.

Member Function Documentation

◆ GetSocketCount()

uint32_t AzNetworking::TcpListenThread::GetSocketCount ( ) const

Returns the number of active listen ports bound to this thread.

Returns
the number of active listen ports bound to this thread

◆ GetUpdateTimeMs()

AZ::TimeMs AzNetworking::TcpListenThread::GetUpdateTimeMs ( ) const

Gets the total elapsed time spent updating the background thread in milliseconds

Returns
the total elapsed time spent updating the background thread in milliseconds

◆ Listen()

bool AzNetworking::TcpListenThread::Listen ( TcpNetworkInterface tcpNetworkInterface)

Opens a new listen socket capable of accepting incoming connections for the provided TcpNetworkInterface.

Parameters
tcpNetworkInterfacethe TcpNetworkInterface being opened to incoming connections
Returns
boolean true if the operation was successful, false if it failed

◆ StopListening()

bool AzNetworking::TcpListenThread::StopListening ( TcpNetworkInterface tcpNetworkInterface)

Stops listening for incoming connections for the provided TcpNetworkInterface.

Parameters
tcpNetworkInterfacethe TcpNetworkInterface being closed to new incoming connections
Returns
boolean true if the operation was successful, false if it failed

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