MCPcopy
hub / github.com/coder/websocket / writeTimeout

Function writeTimeout

internal/examples/chat/chat.go:192–197  ·  view source on GitHub ↗
(ctx context.Context, timeout time.Duration, c *websocket.Conn, msg []byte)

Source from the content-addressed store, hash-verified

190}
191
192func writeTimeout(ctx context.Context, timeout time.Duration, c *websocket.Conn, msg []byte) error {
193 ctx, cancel := context.WithTimeout(ctx, timeout)
194 defer cancel()
195
196 return c.Write(ctx, websocket.MessageText, msg)
197}

Callers 1

subscribeMethod · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…