We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b718e7c commit 21542e2Copy full SHA for 21542e2
protocol.go
@@ -63,6 +63,15 @@ func ValidateHeader(v Validator) func(*Conn) {
63
}
64
65
66
+// SetReadHeaderTimeout sets the readHeaderTimeout for a connection when passed as option to NewConn()
67
+func SetReadHeaderTimeout(t time.Duration) func(*Conn) {
68
+ return func(c *Conn) {
69
+ if t >= 0 {
70
+ c.readHeaderTimeout = t
71
+ }
72
73
+}
74
+
75
// Accept waits for and returns the next connection to the listener.
76
func (p *Listener) Accept() (net.Conn, error) {
77
// Get the underlying connection
0 commit comments