We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2754118 commit 8b058cfCopy full SHA for 8b058cf
src/net/net.go
@@ -146,6 +146,13 @@ type Conn interface {
146
// the deadline after successful Read or Write calls.
147
//
148
// A zero value for t means I/O operations will not time out.
149
+ //
150
+ // Note that if a TCP connection has keep-alive turned on,
151
+ // which is the default unless overridden by Dialer.KeepAlive
152
+ // or ListenConfig.KeepAlive, then a keep-alive failure may
153
+ // also return a timeout error. On Unix systems a keep-alive
154
+ // failure on I/O can be detected using
155
+ // errors.Is(err, syscall.ETIMEDOUT).
156
SetDeadline(t time.Time) error
157
158
// SetReadDeadline sets the deadline for future Read calls
0 commit comments