onRoundTripResponse()
Availability:
SmartFoxServer Lite / Basic / Pro
Usage:
smartFox.onRoundTripResponse(time <integer>)
Description:
This event is fired when the server responds to a roundTripBench() request.
The roundtrip time represents the amount of milliseconds that it takes
a message to go from the client to the server and get back to 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:
time | trip time expressed in milliseconds |
Returns:
nothing
Example:
on onRoundTripResponse me, time pingTime = time / 2 put("Average roundtrip time: " & pingTime) end
See also: