From 5028f225d6ace0e770e99b69beca74666d3641ca Mon Sep 17 00:00:00 2001 From: Anmol Sethi <hi@nhooyr.io> Date: Thu, 15 Aug 2019 16:46:32 -0700 Subject: [PATCH] Clarify Ping API in README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d07c1b..7cbc68d 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,8 @@ makes it very easy to close the connection with a status code and reason. The ping API is also nicer. gorilla/websocket requires registering a pong handler on the Conn which results in awkward control flow. With nhooyr/websocket you use the Ping method on the Conn -that sends a ping and also waits for the pong. +that sends a ping and also waits for the pong, though you must be reading from the connection +for the pong to be read. In terms of performance, the differences mostly depend on your application code. nhooyr/websocket reuses message buffers out of the box if you use the wsjson and wspb subpackages. -- GitLab