The interface for creating and working with network interfaces.
More...
#include <INetworking.h>
Inherited by AzNetworking::NetworkingSystemComponent.
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.
◆ CreateCompressor()
virtual AZStd::unique_ptr< ICompressor > AzNetworking::INetworking::CreateCompressor |
( |
const AZStd::string_view |
name | ) |
|
|
pure virtual |
Creates a compressor using a registered factory looked up by name
- Parameters
-
name | The name of the Compressor Factory to use, must match result of factory->GetFactoryName() |
- Returns
- A unique_ptr to the new compressor
Implemented in AzNetworking::NetworkingSystemComponent.
◆ CreateNetworkInterface()
virtual INetworkInterface * AzNetworking::INetworking::CreateNetworkInterface |
( |
const AZ::Name & |
name, |
|
|
ProtocolType |
protocolType, |
|
|
TrustZone |
trustZone, |
|
|
IConnectionListener & |
listener |
|
) |
| |
|
pure virtual |
Creates a new network interface instance with the provided parameters. Caller does not assume ownership, instance should be destroyed by calling DestroyNetworkInterface
- Parameters
-
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 |
- Returns
- pointer to the instantiated network interface, or nullptr on error
Implemented in AzNetworking::NetworkingSystemComponent.
◆ DestroyNetworkInterface()
virtual bool AzNetworking::INetworking::DestroyNetworkInterface |
( |
const AZ::Name & |
name | ) |
|
|
pure virtual |
Destroys a network interface instance by name.
- Parameters
-
name | the name of the network interface to destroy |
- Returns
- boolean true on success or false on failure
Implemented in AzNetworking::NetworkingSystemComponent.
◆ ForceUpdate()
virtual void AzNetworking::INetworking::ForceUpdate |
( |
| ) |
|
|
pure virtual |
◆ GetNetworkInterfaces()
virtual const NetworkInterfaces & AzNetworking::INetworking::GetNetworkInterfaces |
( |
| ) |
const |
|
pure virtual |
◆ GetTcpListenThreadSocketCount()
virtual uint32_t AzNetworking::INetworking::GetTcpListenThreadSocketCount |
( |
| ) |
const |
|
pure virtual |
◆ GetTcpListenThreadUpdateTime()
virtual AZ::TimeMs AzNetworking::INetworking::GetTcpListenThreadUpdateTime |
( |
| ) |
const |
|
pure virtual |
◆ GetUdpReaderThreadSocketCount()
virtual uint32_t AzNetworking::INetworking::GetUdpReaderThreadSocketCount |
( |
| ) |
const |
|
pure virtual |
◆ GetUdpReaderThreadUpdateTime()
virtual AZ::TimeMs AzNetworking::INetworking::GetUdpReaderThreadUpdateTime |
( |
| ) |
const |
|
pure virtual |
◆ RegisterCompressorFactory()
virtual void AzNetworking::INetworking::RegisterCompressorFactory |
( |
ICompressorFactory * |
factory | ) |
|
|
pure virtual |
◆ RetrieveNetworkInterface()
virtual INetworkInterface * AzNetworking::INetworking::RetrieveNetworkInterface |
( |
const AZ::Name & |
name | ) |
|
|
pure virtual |
Retrieves a network interface instance by name.
- Parameters
-
name | the name of the network interface to retrieve |
- Returns
- pointer to the requested network interface, or nullptr on error
Implemented in AzNetworking::NetworkingSystemComponent.
◆ UnregisterCompressorFactory()
virtual bool AzNetworking::INetworking::UnregisterCompressorFactory |
( |
const AZStd::string_view |
name | ) |
|
|
pure virtual |
Unregisters the compressor factory
- Parameters
-
name | The name of the Compressor factory to unregister, must match result of factory->GetFactoryName() |
- Returns
- Whether the factory was found and unregistered
Implemented in AzNetworking::NetworkingSystemComponent.
The documentation for this class was generated from the following file:
- Code/Framework/AzNetworking/AzNetworking/Framework/INetworking.h