Flash Media Server Developer Documentation

Client.ping()

clientObject.ping()

Sends a "ping" message to the client and waits for a response. If the client responds, the method returns true; otherwise, false. Use this method to determine whether the client connection is still active.

Availability

Flash Communication Server 1

Example

The following onConnect() function pings the connecting client and traces the results of the method:

application.onConnect(newClient) {
    if (newClient.ping()){
        trace("ping successful");
    }
    else {
        trace("ping failed");
    }
}

See also

Client.getStats()