Skip to content

Commit 3b20a49

Browse files
committed
Add back documentation on separate idle and read timeout
Closes #87
1 parent a8e475c commit 3b20a49

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

read.go

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ import (
2626
// Call CloseRead if you do not expect any data messages from the peer.
2727
//
2828
// 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.
2934
func (c *Conn) Reader(ctx context.Context) (MessageType, io.Reader, error) {
3035
return c.reader(ctx)
3136
}

0 commit comments

Comments
 (0)