TakahikoKawasaki / nv-websocket-client

High-quality WebSocket client implementation in Java.
Apache License 2.0
2.03k stars 292 forks source link

Implement correct ping-pong behavior #174

Open strekha opened 5 years ago

strekha commented 5 years ago

Description

This PR adds logic for sending pings and listening pongs.
PING will not be sended if server didn't sent PONG on previous PING. This means that connection was lost and disconnect process will be started.
Note: this code isn't tested, it is proposal. If the author will accept the idea, I will test this approach.

Close #94 Close #142 Close #113

strekha commented 5 years ago

@TakahikoKawasaki, any thoughts?

TakahikoKawasaki commented 5 years ago

Changes breaking backward-compatibility need reasons that are convincing enough.