roundTripBench()

Availability:

SmartFoxServer Lite / Basic / Pro

Usage:

smartFox.roundTripBench()

Description:

Sends a a roundTrip request to the server. The roundTrip request sends a small packet to the server which immediately responds
with another small packets, firing the onRoundTripResponse event. The time taken from the packet to travel back and forth is returned and it
indicates the average network "lag" of the client.

A good way to measure the network lag is to send continuos requests (say every 3 to 5 seconds) and then calculating the average value on a fixed
number of responses (i.e. the last 10 results)

Parameters:

none    

Returns:

Fires the onRoundTripResponse event

Example:

smartFox.roundTripBench()

See also:

onRoundTripResponse