TCP Client Transport
Opens a TCP connection to a device or service: a Modbus TCP device, a serial-to-Ethernet converter, a test server. TCP carries a byte stream, so a codec splits it into messages (for example Modbus TCP, Line or Timeout).
Set Host and Port. TCP Nodelay sends small writes immediately instead of batching them, which most
request/response protocols want; TCP Keepalive detects a peer that vanished without closing the connection.
A Proxy URL (http://, socks5:// or socks5h://, optionally with user:pass@) routes the connection
through a proxy.
If the connection cannot be made or the peer closes it, CycBox reconnects while the engine runs, waiting 1 s and doubling up to 10 s between attempts.

Configuration reference
| Config ID | tcp_client_transport |
| Selected by | app_transport = "tcp_client_transport" |
| Platforms | Linux, Windows, Android |
| License | Free |
TCP network communication
Connection Configuration:
- Host: Server IP address or hostname (supports both IPv4 and IPv6)
- IPv4 examples: 127.0.0.1, 192.168.1.100
- IPv6 examples: ::1, fe80::1, 2001:db8::1
- Port: Server listening port number
- Timeout: Connection timeout in milliseconds
TCP Options:
- Enable KeepAlive: Enable TCP keep-alive mechanism to periodically send probe packets to detect if connection is still alive
- Keep-alive time: 60 seconds
- Probe interval: 10 seconds
- Enable NoDelay: Disable Nagle's algorithm to send small packets immediately without buffering
- Enable for low latency, suitable for real-time communication
- Disable for higher throughput, suitable for bulk data transfer
Proxy (optional):
- Leave empty for a direct connection. Supported proxy URL formats:
http://[user:pass@]host:port- HTTP CONNECT tunnelsocks5://[user:pass@]host:port- SOCKS5 (target hostname resolved locally)socks5h://[user:pass@]host:port- SOCKS5 (target hostname resolved by the proxy)
| Setting | Key | Type | Default | Notes |
|---|---|---|---|---|
| Host | tcp_client_transport_host | Text (with presets) | "127.0.0.1" | Required |
| Port | tcp_client_transport_port | Integer (with presets) | 8080 | Required |
| Connection Timeout (ms) | tcp_client_transport_timeout | Integer (with presets) | 5000 | Required |
| TCP Keepalive | tcp_client_transport_keepalive | Boolean | true | Required |
| TCP Nodelay | tcp_client_transport_nodelay | Boolean | true | Required |
| Proxy URL (optional) | tcp_client_transport_proxy_url | Text (with presets) | "" |
Setting details
Host
Presets (any other value can be entered):
| Value | Label |
|---|---|
"127.0.0.1" | localhost |
"::1" | localhost (IPv6) |
"0.0.0.0" | 0.0.0.0 |
"::" | :: (IPv6 any) |
Port
Presets (any other value can be entered):
| Value | Label |
|---|---|
8080 | 8080 |
9000 | 9000 |
3000 | 3000 |
Connection Timeout (ms)
Presets (any other value can be entered):
| Value | Label |
|---|---|
3000 | 3s |
5000 | 5s |
10000 | 10s |
30000 | 30s |
Proxy URL (optional)
Presets (any other value can be entered):
| Value | Label |
|---|---|
"" | No proxy |
"http://proxy.example.com:8080" | HTTP |
"http://user:pass@proxy.example.com:8080" | HTTP with auth |
"socks5://proxy.example.com:1080" | SOCKS5 |
"socks5://user:pass@proxy.example.com:1080" | SOCKS5 with auth |
"socks5h://proxy.example.com:1080" | SOCKS5h (remote DNS) |
Example config
Default values as they appear in a saved configuration (for example the JSON block at the end of a cycbox/examples/*.lua file). Settings detected at runtime are omitted.
{
"app": {
"app_transport": "tcp_client_transport"
},
"tcp_client_transport": {
"tcp_client_transport_host": "127.0.0.1",
"tcp_client_transport_port": 8080,
"tcp_client_transport_timeout": 5000,
"tcp_client_transport_keepalive": true,
"tcp_client_transport_nodelay": true,
"tcp_client_transport_proxy_url": ""
}
}