You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way for the client to know that the internet on its side has got disconnected, so that it should stop sending data to the server and in turn, try to create a new connection with the server as soon as the internet is connected again.
In cases, where there is no internet, the on_fail() / on_close() api(s) do not get triggered, and hence the client continues to send data.
Are there any heartbeat or keepalive messages that can be used to check if the internet connection is still on?
The text was updated successfully, but these errors were encountered:
you'll generally need to write some data to the socket in order to detect a disconnect. The WebSocket protocol has a ping message that you can send that can be used to detect liveness without transmitting any data messages.
In WebSocket++ you can send pings with connection::ping. The results will come either as a close handler resulting from the TCP bad pipe or you can register a pong timeout handler that will let you know as soon as the expected reply from the other end is late (for whatever definition of late that you configure)
Is there a way for the client to know that the internet on its side has got disconnected, so that it should stop sending data to the server and in turn, try to create a new connection with the server as soon as the internet is connected again.
In cases, where there is no internet, the on_fail() / on_close() api(s) do not get triggered, and hence the client continues to send data.
Are there any heartbeat or keepalive messages that can be used to check if the internet connection is still on?
The text was updated successfully, but these errors were encountered: