File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,9 @@ your application doesn't always need to read from the connection unless it expec
128128gorilla/websocket requires you to constantly read from the connection to respond to control frames
129129even 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 Ping method on the Conn that sends a ping and waits for the pong.
133- Callbacks tend to encourage awkward control flow .
131+ The ping API is also much nicer. gorilla/websocket requires registering a pong handler on the Conn
132+ which results in an awkward control flow. With nhooyr/websocket you use the Ping method on
133+ the Conn that sends a ping and also waits for the pong .
134134
135135In terms of performance, the differences depend on your application code. nhooyr/websocket
136136reuses buffers efficiently out of the box if you use the wsjson and wspb subpackages whereas
You can’t perform that action at this time.
0 commit comments