Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAlivePeriodTime = 3 * time.Minute
Functions ¶
func NewTcpKeepAliveListener ¶
Types ¶
type TcpKeepAliveListener ¶
type TcpKeepAliveListener struct { *net.TCPListener // contains filtered or unexported fields }
tcpKeepAliveListener sets TCP keep-alive timeouts on accepted connections. It's used by ListenAndServe and ListenAndServeTLS so dead TCP connections (e.g. closing laptop mid-download) eventually go away. 来自net/http
Click to show internal directories.
Click to hide internal directories.