Websocket-King icon indicating copy to clipboard operation
Websocket-King copied to clipboard

Support client ping/pong protocol to check the network

Open iflamed opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. Need the ping/pong protocol to test the network issue.

Describe the solution you'd like A config to enable or disable the ping/pong feature or set the interval to send ping request.

Describe alternatives you've considered None

iflamed avatar Dec 21 '20 05:12 iflamed

Hi @iflamed, ping/pong is implemented at the frame level so isn't accessible in JavaScript. See this answer on stack overflow for more detail: https://stackoverflow.com/a/10586583/416199.

Are you using an implementation in JavaScript (eg sending ping and pong strings)?

tomlerendu avatar Dec 21 '20 19:12 tomlerendu

It’s very strange! When I debug my websocket server, the java client will sent ping message. But i never receive the ping message from browser.

On Dec 22, 2020, at 3:23 AM, Tom Lerendu [email protected] wrote:

 Hi @iflamed, ping/pong is implemented at the frame level so isn't accessible in JavaScript. See this answer on stack overflow for more detail: https://stackoverflow.com/a/10586583/416199.

Are you using an implementation in JavaScript (eg sending ping and pong strings)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

iflamed avatar Dec 22 '20 01:12 iflamed