interface class for network connections.
More...
#include <IConnection.h>
Inherited by AzNetworking::TcpConnection, and AzNetworking::UdpConnection.
interface class for network connections.
IConnection provides a pure-virtual interface for all network connection types. IConnections provide access to a ConnectionMetrics object which provides a variety of metrics on the connection itself such as data rate, RTT and packet statistics.
◆ IConnection()
AzNetworking::IConnection::IConnection |
( |
ConnectionId |
connectionId, |
|
|
const IpAddress & |
address |
|
) |
| |
|
inline |
Construct with a specific connectionId and remoteAddress.
- Parameters
-
connectionId | the connection identifier to use for this connection |
address | the remote address this connection |
◆ Disconnect()
virtual bool AzNetworking::IConnection::Disconnect |
( |
DisconnectReason |
reason, |
|
|
TerminationEndpoint |
endpoint |
|
) |
| |
|
pure virtual |
Disconnects the connection with the provided termination reason
- Parameters
-
reason | reason for the disconnect |
endpoint | which endpoint initiated the disconnect, local or remote |
- Returns
- boolean true on success
Implemented in AzNetworking::UdpConnection, and AzNetworking::TcpConnection.
◆ GetConnectionId()
ConnectionId AzNetworking::IConnection::GetConnectionId |
( |
| ) |
const |
|
inline |
Returns the connection identifier for this connection instance.
- Returns
- the connection identifier for this connection instance
◆ GetConnectionMtu()
virtual uint32_t AzNetworking::IConnection::GetConnectionMtu |
( |
| ) |
const |
|
pure virtual |
◆ GetConnectionQuality() [1/2]
Retrieves debug connection quality settings, non-const. Currently unsupported on TcpConnections
- Returns
- connection quality structure for this connection
◆ GetConnectionQuality() [2/2]
Retrieves debug connection quality settings. Currently unsupported on TcpConnections
- Returns
- connection quality structure for this connection
◆ GetConnectionRole()
virtual ConnectionRole AzNetworking::IConnection::GetConnectionRole |
( |
| ) |
const |
|
pure virtual |
◆ GetConnectionState()
virtual ConnectionState AzNetworking::IConnection::GetConnectionState |
( |
| ) |
const |
|
pure virtual |
◆ GetMetrics() [1/2]
Retrieves connection metric info, non-const.
- Returns
- reference to the connection metric info
◆ GetMetrics() [2/2]
Retrieves connection metric info.
- Returns
- reference to the connection metric info
◆ GetRemoteAddress()
const IpAddress & AzNetworking::IConnection::GetRemoteAddress |
( |
| ) |
const |
|
inline |
Returns the remote address for this connection instance.
- Returns
- the remote address for this connection instance
◆ GetUserData()
void * AzNetworking::IConnection::GetUserData |
( |
| ) |
const |
|
inline |
Retrieves the connection user data bound to this instance.
- Returns
- the connection user data bound to this instance
◆ SendReliablePacket()
virtual bool AzNetworking::IConnection::SendReliablePacket |
( |
const IPacket & |
packet | ) |
|
|
pure virtual |
◆ SendUnreliablePacket()
virtual PacketId AzNetworking::IConnection::SendUnreliablePacket |
( |
const IPacket & |
packet | ) |
|
|
pure virtual |
◆ SetConnectionMtu()
virtual void AzNetworking::IConnection::SetConnectionMtu |
( |
uint32_t |
connectionMtu | ) |
|
|
pure virtual |
◆ SetRemoteAddress()
void AzNetworking::IConnection::SetRemoteAddress |
( |
const IpAddress & |
address | ) |
|
|
inline |
Sets the remote address for this connection instance.
- Parameters
-
address | the remote address to use for this connection instance |
◆ SetUserData()
void AzNetworking::IConnection::SetUserData |
( |
void * |
userData | ) |
|
|
inline |
Sets connection user data to the provided value.
- Parameters
-
userData | the user data value to bind to this connection |
◆ WasPacketAcked()
virtual bool AzNetworking::IConnection::WasPacketAcked |
( |
PacketId |
packetId | ) |
const |
|
pure virtual |
Returns true if the given packet id was confirmed acknowledged by the remote endpoint, false otherwise.
- Parameters
-
packetId | the packet id of the packet to confirm acknowledgment of |
- Returns
- boolean true if the packet is confirmed acknowledged, false if the packet number is out of range, lost, or still pending acknowledgment
Implemented in AzNetworking::UdpConnection, and AzNetworking::TcpConnection.
The documentation for this class was generated from the following files:
- Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/IConnection.h
- Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/IConnection.inl