Document return value of WebSocket.ping().

This commit is contained in:
James Coglan
2012-02-11 12:10:39 +00:00
parent 25794989f0
commit 8523605f88
+2 -1
View File
@@ -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() {