Document return value of WebSocket.ping().
This commit is contained in:
+2
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user