Open 3D Engine AzNetworking API Reference
2305.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
The interface for creating and working with network interfaces. More...
#include <INetworking.h>
Inherited by AzNetworking::NetworkingSystemComponent.
Public Member Functions | |
AZ_RTTI (INetworking,"{6E47367B-3AA5-4CB8-A691-4910168F287A}") | |
virtual INetworkInterface * | CreateNetworkInterface (const AZ::Name &name, ProtocolType protocolType, TrustZone trustZone, IConnectionListener &listener)=0 |
virtual INetworkInterface * | RetrieveNetworkInterface (const AZ::Name &name)=0 |
virtual bool | DestroyNetworkInterface (const AZ::Name &name)=0 |
virtual void | RegisterCompressorFactory (ICompressorFactory *factory)=0 |
virtual AZStd::unique_ptr < ICompressor > | CreateCompressor (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 |
The interface for creating and working with network interfaces.
INetworking is an Az::Interface<T> that provides applications access to higher level networking abstractions. AzNetworking::INetworking can be used to instantiate new INetworkInterfaces that can be configured to operate over either TCP or UDP, enable or disable encryption, and be assigned a trust level.
INetworking is also responsible for registering ICompressorFactory implementations. This allows a developer to have access to multiple ICompressorFactory implementations by name. The MultiplayerCompressor Gem is an example of this using the LZ4 algorithm.
|
pure virtual |
Creates a compressor using a registered factory looked up by name
name | The name of the Compressor Factory to use, must match result of factory->GetFactoryName() |
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Creates a new network interface instance with the provided parameters. Caller does not assume ownership, instance should be destroyed by calling DestroyNetworkInterface
name | the name to assign to this network interface |
protocolType | the type of interface to instantiate (Tcp or Udp) |
trustZone | the trust level associated with this network interface (client to server or server to server) |
listener | the connection listener responsible for handling connection events |
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Destroys a network interface instance by name.
name | the name of the network interface to destroy |
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Forcibly swaps reader thread buffers and updates all Network Interfaces CAUTION: For use when SystemTickBus is suspended or similar
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Returns the raw network interfaces owned by the networking instance.
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Returns the number of sockets monitored by our TcpListenThread.
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Returns the total time spent updating our TcpListenThread.
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Returns the number of sockets monitored by our UdpReaderThread.
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Returns the total time spent updating our UdpReaderThread.
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Registers a Compressor Factory that can be used to create compressors for INetworkInterfaces
factory | The ICompressorFactory to register |
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Retrieves a network interface instance by name.
name | the name of the network interface to retrieve |
Implemented in AzNetworking::NetworkingSystemComponent.
|
pure virtual |
Unregisters the compressor factory
name | The name of the Compressor factory to unregister, must match result of factory->GetFactoryName() |
Implemented in AzNetworking::NetworkingSystemComponent.