When WebSocket-over-HTTP is used according to the standard example, it doesn't handle standalone PING.
This is because of the loop it uses:
while (wsContext.canRecv()) {
const message = wsContext.recv();
if (message == null) {
// If return value is undefined then connection is closed
wsContext.close();
break;
}
// Handle the message...
}
Within wsContext.recv(), js-grip automatically handles PING by writing an outgoing PONG.
However, the ws.Context.canRecv() function only returns true in response to the messages: ['TEXT', 'BINARY', 'CLOSE', 'DISCONNECT'].
Therefore, if the only message in the queue is 'PING', it is never reaches recv().