Connection Class
Namespace: Riptide
Assembly: RiptideNetworking.dll
public abstract class Connection
Inherited Members
Constructors
| Connection() | Initializes the connection. |
Fields
| AvgSendAttemptsResilience | How many consecutive times MaxAvgSendAttempts can be exceeded before triggering a disconnect. |
| CanQualityDisconnect | Whether or not the connection can disconnect due to poor connection quality. |
| MaxAvgSendAttempts | The maximum acceptable average number of send attempts it takes to deliver a reliable message. The connection will be closed if this is exceeded more than AvgSendAttemptsResilience times in a row. |
| MaxNotifyLoss | The maximum acceptable loss rate of notify messages. The connection will be closed if this is exceeded more than NotifyLossResilience times in a row. |
| MaxSendAttempts | The absolute maximum number of times a reliable message may be sent. A single message reaching this threshold will cause a disconnection. |
| Metrics | The connection's metrics. |
| NotifyDelivered | Invoked when the notify message with the given sequence ID is successfully delivered. |
| NotifyLossResilience | How many consecutive times MaxNotifyLoss can be exceeded before triggering a disconnect. |
| NotifyLost | Invoked when the notify message with the given sequence ID is lost. |
| NotifyReceived | Invoked when a notify message is received. |
| ReliableDelivered | Invoked when the reliable message with the given sequence ID is successfully delivered. |
Properties
| CanTimeout | Whether or not the connection can time out. |
| Id | The connection's numeric ID. |
| IsConnected | Whether or not the connection is currently connected. |
| IsConnecting | Whether or not the connection is currently in the process of connecting. |
| IsNotConnected | Whether or not the connection is currently not trying to connect, pending, nor actively connected. |
| IsPending | Whether or not the connection is currently pending (waiting to be accepted/rejected by the server). |
| RTT | The round trip time (ping) of the connection, in milliseconds. -1 if not calculated yet. |
| SmoothRTT | The smoothed round trip time (ping) of the connection, in milliseconds. -1 if not calculated yet. |
| TimeoutTime | The time (in milliseconds) after which to disconnect if no heartbeats are received. |
Methods
| OnNotifyDelivered(ushort) | Invokes the NotifyDelivered event. |
| OnNotifyLost(ushort) | Invokes the NotifyLost event. |
| ResetTimeout() | Resets the connection's timeout time. |
| Send(Message, bool) | Sends a message. |
| Send(byte[], int) | Sends data. |