AutobahnAndroid's WebSocketWriter supports client pong messages, and AutobahnPython claims the following:
explicit processing of Pings/Pongs is unnecessary normally - AutobahnPython will do the right thing under the hood.
However, during execution of a simple chat client-server setup, I observe no such ping/pong heartbeat messages.
From what I have read, it is unclear from both the documentation and the source, what the full requirements are for enabling implicit Autobahn* heartbeats.
My personal solution involves issuing a ping from the server during onConnection and the appropriate onMesssage, and something similar to the following client code onMessage:
if (payload.equals("ping from the server"))) {
handler.postDelayed(new Runnable() {
@Override
public void run() {
myWebSocket.sendTextMessage("pong from the client");
}
}, 1000L);
}
... which schedules a pong response to be sent by the client, 1 second after receiving a ping from the server.