Skip to content

Commit

Permalink
Add back documentation on separate idle and read timeout
Browse files Browse the repository at this point in the history
Closes #87
  • Loading branch information
nhooyr committed Jan 9, 2021
1 parent a8e475c commit 3b20a49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions read.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ import (
// Call CloseRead if you do not expect any data messages from the peer.
//
// Only one Reader may be open at a time.
//
// If you need a separate timeout on the Reader call and the Read itself,
// use time.AfterFunc to cancel the context passed in.
// See https://github.com/nhooyr/websocket/issues/87#issue-451703332
// Most users should not need this.
func (c *Conn) Reader(ctx context.Context) (MessageType, io.Reader, error) {
return c.reader(ctx)
}
Expand Down

0 comments on commit 3b20a49

Please sign in to comment.