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.
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 |
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::TcpConnection, and AzNetworking::UdpConnection.
ConnectionId AzNetworking::IConnection::GetConnectionId |
( |
| ) |
const |
|
inline |
Returns the connection identifier for this connection instance.
- Returns
- the connection identifier for this connection instance
virtual uint32_t AzNetworking::IConnection::GetConnectionMtu |
( |
| ) |
const |
|
pure virtual |
Retrieves debug connection quality settings. Currently unsupported on TcpConnections
- Returns
- connection quality structure for this connection
Retrieves debug connection quality settings, non-const. Currently unsupported on TcpConnections
- Returns
- connection quality structure for this connection
virtual ConnectionRole AzNetworking::IConnection::GetConnectionRole |
( |
| ) |
const |
|
pure virtual |
virtual ConnectionState AzNetworking::IConnection::GetConnectionState |
( |
| ) |
const |
|
pure virtual |
Retrieves connection metric info.
- Returns
- reference to the connection metric info
Retrieves connection metric info, non-const.
- Returns
- reference to the connection metric info
const IpAddress & AzNetworking::IConnection::GetRemoteAddress |
( |
| ) |
const |
|
inline |
Returns the remote address for this connection instance.
- Returns
- the remote address for this connection instance
void * AzNetworking::IConnection::GetUserData |
( |
| ) |
const |
|
inline |
Retrieves the connection user data bound to this instance.
- Returns
- the connection user data bound to this instance
virtual bool AzNetworking::IConnection::SendReliablePacket |
( |
const IPacket & |
packet | ) |
|
|
pure virtual |
virtual PacketId AzNetworking::IConnection::SendUnreliablePacket |
( |
const IPacket & |
packet | ) |
|
|
pure virtual |
virtual void AzNetworking::IConnection::SetConnectionMtu |
( |
uint32_t |
connectionMtu | ) |
|
|
pure virtual |
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 |
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 |
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::TcpConnection, and AzNetworking::UdpConnection.
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