Tracks current UDP endpoints and allows fast lookups by connection identifier and remote address.
More...
#include <UdpConnectionSet.h>
Inherits AzNetworking::IConnectionSet.
|
using | ConnectionIdMap = AZStd::unordered_map< ConnectionId, AZStd::unique_ptr< UdpConnection > > |
|
using | RemoteAddressMap = AZStd::unordered_map< IpAddress, UdpConnection * > |
|
using | ConnectionVisitor = AZStd::function< void(IConnection &)> |
|
Tracks current UDP endpoints and allows fast lookups by connection identifier and remote address.
◆ AddConnection()
bool AzNetworking::UdpConnectionSet::AddConnection |
( |
AZStd::unique_ptr< UdpConnection > |
connection | ) |
|
Adds a new connection to this connection list instance.
- Parameters
-
connection | pointer to the connection instance to add |
- Returns
- boolean true on success
◆ DeleteConnection() [1/2]
bool AzNetworking::UdpConnectionSet::DeleteConnection |
( |
ConnectionId |
connectionId | ) |
|
|
overridevirtual |
Deletes a connection from this connection list instance by connection identifier.
- Parameters
-
connectionId | connection identifier of the connection to delete |
- Returns
- boolean true on success
Implements AzNetworking::IConnectionSet.
◆ DeleteConnection() [2/2]
bool AzNetworking::UdpConnectionSet::DeleteConnection |
( |
const IpAddress & |
address | ) |
|
Deletes a connection from this connection list instance by endpoint remote address.
- Parameters
-
address | address of the remote endpoint to delete |
- Returns
- boolean true on success
◆ GetActiveConnectionCount()
uint32_t AzNetworking::UdpConnectionSet::GetActiveConnectionCount |
( |
| ) |
const |
|
overridevirtual |
Returns the current total count of connections not pending disconnect for this connection set
- Returns
- the current total count of connections not pending disconnect for this connection set
Implements AzNetworking::IConnectionSet.
◆ GetConnection() [1/2]
IConnection * AzNetworking::UdpConnectionSet::GetConnection |
( |
ConnectionId |
connectionId | ) |
const |
|
overridevirtual |
Retrieves a connection from this connection set by connection identifier.
- Parameters
-
connectionId | connection identifier of the connection to retrieve |
- Returns
- pointer to the requested connection instance on success, nullptr on failure
Implements AzNetworking::IConnectionSet.
◆ GetConnection() [2/2]
Retrieves a connection from this connection list instance by endpoint remote address
- Parameters
-
address | address of the remote endpoint of the connection to retrieve |
- Returns
- pointer to the requested connection instance on success, nullptr on failure
◆ GetConnectionCount()
uint32_t AzNetworking::UdpConnectionSet::GetConnectionCount |
( |
| ) |
const |
|
overridevirtual |
Returns the current total connection count for this connection set
- Returns
- the current total connection count for this connection set
Implements AzNetworking::IConnectionSet.
◆ GetNextConnectionId()
ConnectionId AzNetworking::UdpConnectionSet::GetNextConnectionId |
( |
| ) |
|
|
overridevirtual |
Returns the next valid connection identifier for this connection list instance.
- Returns
- a valid connection identifier to give a new connection instance, or InvalidConnectionId on failure
Implements AzNetworking::IConnectionSet.
◆ VisitConnections()
void AzNetworking::UdpConnectionSet::VisitConnections |
( |
const ConnectionVisitor & |
visitor | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file:
- Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpConnectionSet.h