From 8523605f88813534bedda26407ffbcedfecfa634 Mon Sep 17 00:00:00 2001 From: James Coglan Date: Sat, 11 Feb 2012 12:10:39 +0000 Subject: [PATCH] Document return value of WebSocket.ping(). --- README.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index b298c75..3f53736 100644 --- a/README.markdown +++ b/README.markdown @@ -65,7 +65,8 @@ If you need to detect when the WebSocket handshake is complete, you can use the If the connection's protocol version supports it, you can call `ws.ping()` to send a ping message and wait for the client's response. This method takes a message string, and an optional callback that fires when a matching pong message -is received. If the client does not support ping/pong, this method does nothing. +is received. It returns `true` iff a ping message was sent. If the client does +not support ping/pong, this method sends no data and returns `false`. ```js ws.ping('Mic check, one, two', function() {