I am using y-websocket(newest version) as the server side, from the y-websocket souce code, I found the ping pong code, is there need to send pong message from the client side? I have tried to listen the ping message in client side but did not get the ping message from server side, this is the client code look like:
const wsProvider: WebsocketProvider = new WebsocketProvider(readConfig("wssUrl"), docId, ydoc, {
maxBackoffTime: 1000000,
params: {
// https://self-issued.info/docs/draft-ietf-oauth-v2-bearer.html#query-param
access_token: localStorage.getItem(WheelGlobal.ACCESS_TOKEN_NAME) ?? ""
}
});
wsProvider.on('ping', (event: MessageEvent) => {
console.warn("recived ping message");
wsProvider.ws.pong();
});
what should I do to add the ping pong when using y-websosket?