We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e7b5f8 commit aef42a8Copy full SHA for aef42a8
doc.go
@@ -102,4 +102,19 @@
102
// methods (NextReader, SetReadDeadline, ReadMessage). The Close and
103
// WriteControl methods can be called concurrently with all other methods.
104
//
105
+// Read is Required
106
+//
107
+// The application must read the connection to process ping and close messages
108
+// sent from the peer. If the application is not otherwise interested in
109
+// messages from the peer, then the application should start a goroutine to read
110
+// and discard messages from the peer. A simple example is:
111
112
+// func readLoop(c *websocket.Conn) {
113
+// for {
114
+// if _, _, err := c.NextReader(); err != nil {
115
+// c.Close()
116
+// break
117
+// }
118
119
120
package websocket
0 commit comments