Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractConn ¶
ExtractConn tries to extract the underlying net.TCPConn from a tls.Conn or net.Conn.
func KeepAliveTimeouts ¶
func KeepAliveTimeouts() (keepaliveConfig net.KeepAliveConfig, userTimeout time.Duration)
KeepAliveTimeouts defines the TCP keep alive configuration to be applied to connections. - TCP keep alive idle time set to 3 seconds. - TCP keep alive interval set to 15 seconds. - TCP keep alive count set to 9. - userTimeout set to a value slightly longer than the total time it would take for all keep alive probes to be sent.
func SetTimeouts ¶
SetTimeouts sets TCP_USER_TIMEOUT and TCP keep alive timeouts on a connection using values from KeepAliveTimeouts. If userTimeout is set to 0 then the default value from KeepAliveTimeouts will be used.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.