A class in Alta.NetworkTransport.Runtime, Alta.NetworkingTransport.Kcp.
Client: the ITransportConnection for the client's single KCP connection to the server.
Constructors
Fields
2 private and internal fields
| Member | What it is |
|---|
private readonly KcpClient client | The kcp2k client. |
private readonly KcpTransport transport | The KcpTransport, used to map game channels to KCP channels. |
Properties
| Member | What it is |
|---|
int Id { get; } | Always 0; the client has only one connection. |
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 the 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 the KCP client. |
void OnDisconnected() | Raises Disconnected; called by the transport. |
INetworkTransportResult Send(byte[] data, int byteCount, int highLevelChannel) | Sends the bytes on the KCP channel mapped from the game channel, writing the game channel into the first byte. |
Used in
Members of other types that take, return or hold a KcpClientConnection: