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.7.3.0 (1.7.3)

Syntax

C#
public void EnableLagMonitor(
	bool enabled,
	int interval,
	int queueSize
)

Parameters

enabled
Type: System..::..Boolean
The lag monitoring status: true to start the monitoring, false to stop it.
interval
Type: System..::..Int32
(default: 4) An optional amount of seconds to wait between each query (recommended 3-4s).
queueSize
Type: System..::..Int32
(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