Skip to main content

KCP

Reliable transport over UDP; more stable on lossy networks. For TLS, see TLS.

Example

Server:

# orbien-server.toml
listen = "0.0.0.0:9527"
kcpPort = 9529

[transport]
tcpMux = true

Client:

# orbien.toml
server = "YOUR_SERVER_IP:9529"

[transport]
protocol = "kcp"
tcpMux = true
heartbeatInterval = -1

server must point at the server kcpPort, and it must not equal quicPort.

Client parameters

ParameterRequiredDefaultDescription
transport.protocolYestcpAlways kcp
serverYesServer address; the port is kcpPort
transport.tcpMuxNotrueTCP multiplexing; must match the server
transport.heartbeatIntervalNo-1Application heartbeat interval (seconds); -1 disables it. Becomes 30 when tcpMux is off
transport.heartbeatTimeoutNo-1Heartbeat timeout (seconds); disconnect if no Pong. Becomes 90 when tcpMux is off; see TCP Multiplexing

Server parameters

ParameterRequiredDefaultDescription
kcpPortYes0KCP listen port (UDP); 0 disables it; must not equal quicPort
transport.tcpMuxNotrueTCP multiplexing; must match the client