Skip to content

Commit 5028f22

Browse files
authored
Clarify Ping API in README.md
1 parent 3a7c15d commit 5028f22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ makes it very easy to close the connection with a status code and reason.
123123

124124
The ping API is also nicer. gorilla/websocket requires registering a pong handler on the Conn
125125
which results in awkward control flow. With nhooyr/websocket you use the Ping method on the Conn
126-
that sends a ping and also waits for the pong.
126+
that sends a ping and also waits for the pong, though you must be reading from the connection
127+
for the pong to be read.
127128

128129
In terms of performance, the differences mostly depend on your application code. nhooyr/websocket
129130
reuses message buffers out of the box if you use the wsjson and wspb subpackages.

0 commit comments

Comments
 (0)