Documentation
¶
Overview ¶
package tcputil contains functions commonly used to manipulate TCP connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableTCPKeepAlive ¶
EnableTCPKeepAlive enabled the KeepAlive option on a TCP connection.
Some cloud providers (like Google Compute Engine) blackhole inactive TCP connections, we need to set TCP keep alive option to prevent that. See: https://developers.google.com/compute/docs/troubleshooting#communicatewithinternet
The same problem can happen when one end of a TCP connection dies and the TCP FIN or RST packet doesn't reach the other end, e.g. when the machine dies, falls off the network, or when there is packet loss. So, it is best to enable this option for all TCP connections.
Types ¶
Click to show internal directories.
Click to hide internal directories.