SmartFoxEnableLagMonitor Method (Boolean, Int32, Int32) |
Enables the automatic realtime monitoring of the lag between the client and the server (round robin).
Namespace:
Sfs2X
Assembly:
SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax public void EnableLagMonitor(
bool enabled,
int interval,
int queueSize
)
Parameters
- enabled
- Type: SystemBoolean
The lag monitoring status: true to start the monitoring, false to stop it. - interval
- Type: SystemInt32
(default: 4) An optional amount of seconds to wait between each query (recommended 3-4s). - queueSize
- Type: SystemInt32
(default: 10) The amount of values stored temporarily and used to calculate the average lag.
Remarks
When turned on, the
PING_PONG event type is dispatched continuously, providing the average of the last ten measured lag values.
The lag monitoring can be enabled after the login has been performed successfully only and it is automatically halted when the user logs out of a Zone or gets disconnected.
See Also