A class in Alta.NetworkTransport.Runtime, Alta.NetworkingTransport.Kcp.
Server: the ITransportConnection for one client's KCP connection, wrapping a kcp2k server connection by id.
Constructors
| Member | What it is |
|---|
KcpServerConnection(KcpTransport transport, KcpServer server, int connectionId) | Creates a KcpServerConnection from transport, server and connectionId. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private readonly KcpServerConnection internalConnection | The kcp2k server connection, looked up by id when created. |
private readonly KcpServer server | The kcp2k server. |
private readonly KcpTransport transport | The KcpTransport, used to map game channels to KCP channels. |
Properties
| Member | What it is |
|---|
int Id { get; } | The kcp2k connection id. |
bool IsFlooded { get; } | Always false for KCP. |
int OutgoingBytesTotal { get; private set; } | Total bytes sent through Send (empty sends not counted). |
int OutgoingPacketsTotal { get; private set; } | Total packets sent through Send (empty sends not counted). |
int OutgoingQueueSize { get; } | Number of messages in this connection's KCP send queue. |
Events
| Member | What it is |
|---|
event Action<ITransportConnection> Disconnected | Raised by OnDisconnected when the connection drops. |
Methods
| Member | What it is |
|---|
INetworkTransportResult Disconnect() | Disconnects this client from the KCP server. |
void OnDisconnected() | Raises Disconnected; called by the transport. |
INetworkTransportResult Send(byte[] data, int byteCount, int highLevelChannel) | Sends the bytes to this client on the mapped KCP channel, writing the game channel into the first byte. |
Used in
Members of other types that take, return or hold a KcpServerConnection: