Skip to content

TCP ​

The base stream transport: opens or accepts a TCP connection.

Structure ​

json
{
  "type": "tcp",
  "settings": {
    "keep_alive": "15s",
    "keep_alive_interval": "15s",
    "keep_alive_count": 9,
    "next_address_delay": "250ms",
    "no_delay": true,
    "dial_timeout": "10s"
  }
}

Fields ​

keep_alive ​

durationDefault: 15s

Idle time before the first keep-alive probe. Negative disables keep-alive.

keep_alive_interval ​

durationDefault: 15s

Time between keep-alive probes.

keep_alive_count ​

integerDefault: 9

Unanswered probes before the connection is dropped, 1 to 255.

next_address_delay ​

durationDefault: 250msoutbound

When a domain has several addresses, how long one attempt runs before the next starts beside it (Happy Eyeballs, RFC 8305). The first to connect wins.

no_delay ​

booleanDefault: true

Send small writes at once instead of batching them (disables Nagle's algorithm).

dial_timeout ​

durationDefault: 10soutbound

How long connecting may take, name resolution included.