Implement websocket ping/pong and heartbeat
EpsilonD3lta opened this issue · 5 comments
Feature request
Implement websocket ping/pong and heartbeat
https://docs.kraken.com/websockets/#message-ping
Why can't you use the available ping/pingAsync?
I don't really see the need for a custom ping. Any particular use case?
Is there any other way to ping a server/check if the socket connection is alive? I could not find it.
And what about the heartbeat?
Why can't you use the available ping/pingAsync?
Where are they available? I cannot find such methods anywhere
When you subscribe you'll receive an UpdateSubscription object. This object has some events like ConnectionLost/ConnectionRestored which you can use to determine the connection state. The connection will automatically be restored when it's lost, so you can assume the connection is alive, unless you've has a ConnectionLost event without a ConnectionRestored follow up.