We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8e475c commit 3b20a49Copy full SHA for 3b20a49
read.go
@@ -26,6 +26,11 @@ import (
26
// Call CloseRead if you do not expect any data messages from the peer.
27
//
28
// Only one Reader may be open at a time.
29
+//
30
+// If you need a separate timeout on the Reader call and the Read itself,
31
+// use time.AfterFunc to cancel the context passed in.
32
+// See https://github.com/nhooyr/websocket/issues/87#issue-451703332
33
+// Most users should not need this.
34
func (c *Conn) Reader(ctx context.Context) (MessageType, io.Reader, error) {
35
return c.reader(ctx)
36
}
0 commit comments