跳到主要内容

TCP

默认传输协议。客户端通过服务端 bindPort 建立控制通道。TLS 配置见 TLS

示例

服务端:

# orbien-server.toml
bindAddr = "0.0.0.0"
bindPort = 9527

[transport]
tcpMux = true

客户端:

# orbien.toml
serverAddr = "YOUR_SERVER_IP"
serverPort = 9527

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

客户端参数

参数必填默认值说明
transport.protocoltcp固定为 tcp
transport.tcpMuxtrueTCP 多路复用;需与服务端一致
transport.heartbeatInterval-1应用心跳间隔(秒);-1 关闭。关闭 tcpMux 时自动变为 30

服务端参数

参数必填默认值说明
bindPort9527TCP 监听端口
transport.tcpMuxtrueTCP 多路复用;需与客户端一致