Just a second...

Pinging the Diffusion server

Ping the Diffusion™ server from your client. If the ping is successful it reports the round-trip time between your client and the Diffusion server.

The Diffusion client libraries and the Diffusion server include capabilities that automatically check whether the connection is active. However, there might be times when you want to check the connection from within your client code. For example, if the client is aware that the device it is hosted on has recently changed from a 3G connection to a WiFi connection.

Use the pings capability to asynchronously ping the Diffusion server.

session.pingServer().then(function(pingResult) {
    // Take action based on ping details.
[session.pings pingServerWithCompletionHandler:
    ^(PTDiffusionPingDetails *details, NSError *error)
    // Check error is `nil`, indicating success.
Java and Android
Pings pings = session.feature(Pings.class);
pings.pingServer(context, callback);
IPings pings = session.Ping;
pings.PingServer( context, callback );
        PING_USER_PARAMS_T params = {
                .on_ping_response = on_ping_response_user
        ping_user(session, params);