MCPcopy Create free account
hub / github.com/gavv/httpexpect / WithReadTimeout

Method WithReadTimeout

websocket.go:100–111  ·  view source on GitHub ↗

WithReadTimeout sets timeout duration for WebSocket connection reads. By default no timeout is used.

(timeout time.Duration)

Source from the content-addressed store, hash-verified

98//
99// By default no timeout is used.
100func (ws *Websocket) WithReadTimeout(timeout time.Duration) *Websocket {
101 opChain := ws.chain.enter("WithReadTimeout()")
102 defer opChain.leave()
103
104 if opChain.failed() {
105 return ws
106 }
107
108 ws.readTimeout = timeout
109
110 return ws
111}
112
113// WithoutReadTimeout removes timeout for WebSocket connection reads.
114func (ws *Websocket) WithoutReadTimeout() *Websocket {

Callers 3

Calls 3

enterMethod · 0.80
leaveMethod · 0.80
failedMethod · 0.80

Tested by 3