We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e883cde commit 22638e0Copy full SHA for 22638e0
websocket.go
@@ -342,6 +342,11 @@ func (c *Conn) handleControl(h header) {
342
// be read if you do not read the message from the connection.
343
//
344
// Only one Reader may be open at a time.
345
+//
346
+// If you need a separate timeout on the Reader call and then the message
347
+// Read, use time.AfterFunc to cancel the context passed in early.
348
+// See https://github.com/nhooyr/websocket/issues/87#issue-451703332
349
+// Most users should not need this.
350
func (c *Conn) Reader(ctx context.Context) (MessageType, io.Reader, error) {
351
typ, r, err := c.reader(ctx)
352
if err != nil {
0 commit comments