Skip to content

Commit d0b105c

Browse files
committed
Mention Ping API in README
1 parent 9eda224 commit d0b105c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ your application doesn't always need to read from the connection unless it expec
128128
gorilla/websocket requires you to constantly read from the connection to respond to control frames
129129
even if you don't expect the peer to send any messages.
130130

131+
The ping API is also much nicer. Unlike gorilla/websocket, you don't need to register a
132+
callback for pongs, there is a single exported Ping method on the Conn you use that sends
133+
a ping and waits for the pong.
134+
131135
In terms of performance, the differences depend on your application code. nhooyr/websocket
132136
reuses buffers efficiently out of the box if you use the wsjson and wspb subpackages whereas
133137
gorilla/websocket does not. As mentioned above, nhooyr/websocket also supports concurrent

0 commit comments

Comments
 (0)