TCP¶
名称: tcp
状态: Stable
TCP拨号器使用TCP建立数据通道。
提示
TCP拨号器是GOST中默认的拨号器,当不指定拨号器类型时,默认使用此拨号器。
参数列表¶
keepalive(bool, default=false):- Enable TCP keep-alive probes on the dialed connection. When enabled, the OS-level TCP keep-alive mechanism detects genuinely dead peers that disappear without sending a TCP RST or FIN, preventing resource leaks from silently-broken connections. Set to
trueto enable. keepalive.idle(time.Duration):- The idle time before the first keep-alive probe is sent. Equivalent to
TCP_KEEPIDLEon Linux. Only effective whenkeepaliveistrue. keepalive.interval(time.Duration):- The interval between successive keep-alive probes. Equivalent to
TCP_KEEPINTVLon Linux. Only effective whenkeepaliveistrue. keepalive.count(int):- The number of unacknowledged keep-alive probes before the connection is declared dead. Equivalent to
TCP_KEEPCNTon Linux. Only effective whenkeepaliveistrue.