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::NetworkingSystemComponent Class Referencefinal

#include <NetworkingSystemComponent.h>

Inherits AZ::Component, AZ::SystemTickBus::Handler, and AzNetworking::INetworking.

Public Member Functions

 AZ_COMPONENT (NetworkingSystemComponent, "{29914D25-5E8F-49C9-8C57-5125ABD3D489}")
 
void Activate () override
 
void Deactivate () override
 
void OnSystemTick () override
 
INetworkInterfaceCreateNetworkInterface (const AZ::Name &name, ProtocolType protocolType, TrustZone trustZone, IConnectionListener &listener) override
 
INetworkInterfaceRetrieveNetworkInterface (const AZ::Name &name) override
 
bool DestroyNetworkInterface (const AZ::Name &name) override
 
void RegisterCompressorFactory (ICompressorFactory *factory) override
 
AZStd::unique_ptr< ICompressorCreateCompressor (const AZStd::string_view name) override
 
bool UnregisterCompressorFactory (const AZStd::string_view name) override
 
const NetworkInterfaces & GetNetworkInterfaces () const override
 
uint32_t GetTcpListenThreadSocketCount () const override
 
AZ::TimeMs GetTcpListenThreadUpdateTime () const override
 
uint32_t GetUdpReaderThreadSocketCount () const override
 
AZ::TimeMs GetUdpReaderThreadUpdateTime () const override
 
void ForceUpdate () override
 
void DumpStats (const AZ::ConsoleCommandContainer &arguments)
 
- Public Member Functions inherited from AzNetworking::INetworking
 AZ_RTTI (INetworking, "{6E47367B-3AA5-4CB8-A691-4910168F287A}")
 
virtual INetworkInterfaceCreateNetworkInterface (const AZ::Name &name, ProtocolType protocolType, TrustZone trustZone, IConnectionListener &listener)=0
 
virtual INetworkInterfaceRetrieveNetworkInterface (const AZ::Name &name)=0
 
virtual bool DestroyNetworkInterface (const AZ::Name &name)=0
 
virtual void RegisterCompressorFactory (ICompressorFactory *factory)=0
 
virtual AZStd::unique_ptr< ICompressorCreateCompressor (const AZStd::string_view name)=0
 
virtual bool UnregisterCompressorFactory (const AZStd::string_view name)=0
 
virtual const NetworkInterfaces & GetNetworkInterfaces () const =0
 
virtual uint32_t GetTcpListenThreadSocketCount () const =0
 
virtual AZ::TimeMs GetTcpListenThreadUpdateTime () const =0
 
virtual uint32_t GetUdpReaderThreadSocketCount () const =0
 
virtual AZ::TimeMs GetUdpReaderThreadUpdateTime () const =0
 
virtual void ForceUpdate ()=0
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 

Detailed Description

Implementation of the networking system interface. This class creates and manages the set of network interfaces used by the application.

Member Function Documentation

◆ Activate()

void AzNetworking::NetworkingSystemComponent::Activate ( )
override

AZ::Component overrides.

◆ CreateCompressor()

AZStd::unique_ptr< ICompressor > AzNetworking::NetworkingSystemComponent::CreateCompressor ( const AZStd::string_view  name)
overridevirtual

Creates a compressor using a registered factory looked up by name

Parameters
nameThe name of the Compressor Factory to use, must match result of factory->GetFactoryName()
Returns
A unique_ptr to the new compressor

Implements AzNetworking::INetworking.

◆ CreateNetworkInterface()

INetworkInterface * AzNetworking::NetworkingSystemComponent::CreateNetworkInterface ( const AZ::Name &  name,
ProtocolType  protocolType,
TrustZone  trustZone,
IConnectionListener listener 
)
overridevirtual

INetworking overrides.

Implements AzNetworking::INetworking.

◆ DestroyNetworkInterface()

bool AzNetworking::NetworkingSystemComponent::DestroyNetworkInterface ( const AZ::Name &  name)
overridevirtual

Destroys a network interface instance by name.

Parameters
namethe name of the network interface to destroy
Returns
boolean true on success or false on failure

Implements AzNetworking::INetworking.

◆ DumpStats()

void AzNetworking::NetworkingSystemComponent::DumpStats ( const AZ::ConsoleCommandContainer &  arguments)

Console commands.

◆ ForceUpdate()

void AzNetworking::NetworkingSystemComponent::ForceUpdate ( )
overridevirtual

Forcibly swaps reader thread buffers and updates all Network Interfaces CAUTION: For use when SystemTickBus is suspended or similar

Implements AzNetworking::INetworking.

◆ GetNetworkInterfaces()

const NetworkInterfaces & AzNetworking::NetworkingSystemComponent::GetNetworkInterfaces ( ) const
overridevirtual

Returns the raw network interfaces owned by the networking instance.

Returns
the raw network interfaces owned by the networking instance

Implements AzNetworking::INetworking.

◆ GetTcpListenThreadSocketCount()

uint32_t AzNetworking::NetworkingSystemComponent::GetTcpListenThreadSocketCount ( ) const
overridevirtual

Returns the number of sockets monitored by our TcpListenThread.

Returns
the number of sockets monitored by our TcpListenThread

Implements AzNetworking::INetworking.

◆ GetTcpListenThreadUpdateTime()

AZ::TimeMs AzNetworking::NetworkingSystemComponent::GetTcpListenThreadUpdateTime ( ) const
overridevirtual

Returns the total time spent updating our TcpListenThread.

Returns
the total time spent updating our TcpListenThread

Implements AzNetworking::INetworking.

◆ GetUdpReaderThreadSocketCount()

uint32_t AzNetworking::NetworkingSystemComponent::GetUdpReaderThreadSocketCount ( ) const
overridevirtual

Returns the number of sockets monitored by our UdpReaderThread.

Returns
the number of sockets monitored by our UdpReaderThread

Implements AzNetworking::INetworking.

◆ GetUdpReaderThreadUpdateTime()

AZ::TimeMs AzNetworking::NetworkingSystemComponent::GetUdpReaderThreadUpdateTime ( ) const
overridevirtual

Returns the total time spent updating our UdpReaderThread.

Returns
the total time spent updating our UdpReaderThread

Implements AzNetworking::INetworking.

◆ OnSystemTick()

void AzNetworking::NetworkingSystemComponent::OnSystemTick ( )
override

AZ::SystemTickBus::Handler overrides.

◆ RegisterCompressorFactory()

void AzNetworking::NetworkingSystemComponent::RegisterCompressorFactory ( ICompressorFactory factory)
overridevirtual

Registers a Compressor Factory that can be used to create compressors for INetworkInterfaces

Parameters
factoryThe ICompressorFactory to register

Implements AzNetworking::INetworking.

◆ RetrieveNetworkInterface()

INetworkInterface * AzNetworking::NetworkingSystemComponent::RetrieveNetworkInterface ( const AZ::Name &  name)
overridevirtual

Retrieves a network interface instance by name.

Parameters
namethe name of the network interface to retrieve
Returns
pointer to the requested network interface, or nullptr on error

Implements AzNetworking::INetworking.

◆ UnregisterCompressorFactory()

bool AzNetworking::NetworkingSystemComponent::UnregisterCompressorFactory ( const AZStd::string_view  name)
overridevirtual

Unregisters the compressor factory

Parameters
nameThe name of the Compressor factory to unregister, must match result of factory->GetFactoryName()
Returns
Whether the factory was found and unregistered

Implements AzNetworking::INetworking.


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