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

Method WithWriteTimeout

websocket.go:130–141  ·  view source on GitHub ↗

WithWriteTimeout sets timeout duration for WebSocket connection writes. By default no timeout is used.

(timeout time.Duration)

Source from the content-addressed store, hash-verified

128//
129// By default no timeout is used.
130func (ws *Websocket) WithWriteTimeout(timeout time.Duration) *Websocket {
131 opChain := ws.chain.enter("WithWriteTimeout()")
132 defer opChain.leave()
133
134 if opChain.failed() {
135 return ws
136 }
137
138 ws.writeTimeout = timeout
139
140 return ws
141}
142
143// WithoutWriteTimeout removes timeout for WebSocket connection writes.
144//

Callers 2

Calls 3

enterMethod · 0.80
leaveMethod · 0.80
failedMethod · 0.80

Tested by 2