MCPcopy Index your code
hub / github.com/coder/websocket / Reader

Method Reader

ws_js.go:337–343  ·  view source on GitHub ↗

Reader attempts to read a message from the connection. The maximum time spent waiting is bounded by the context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

335// Reader attempts to read a message from the connection.
336// The maximum time spent waiting is bounded by the context.
337func (c *Conn) Reader(ctx context.Context) (MessageType, io.Reader, error) {
338 typ, p, err := c.Read(ctx)
339 if err != nil {
340 return 0, nil, err
341 }
342 return typ, bytes.NewReader(p), nil
343}
344
345// Writer returns a writer to write a WebSocket data message to the connection.
346// It buffers the entire message in memory and then sends it when the writer

Callers

nothing calls this directly

Calls 1

ReadMethod · 0.95

Tested by

no test coverage detected