SmartFoxServer Silverlight API
SetHttpPollSpeed Method (sp)
NamespacesSmartFoxClientAPISmartFoxClientSetHttpPollSpeed(Int32)
The minimum interval between two polling requests when connecting to SmartFoxServer via BlueBox module.
The default value is 750 milliseconds. Accepted values are between 0 and 10000 milliseconds (10 seconds).
Declaration Syntax
C#Visual BasicVisual C++
public void SetHttpPollSpeed(
	int sp
)
Public Sub SetHttpPollSpeed ( _
	sp As Integer _
)
public:
void SetHttpPollSpeed(
	int sp
)
Parameters
sp (Int32)
Remarks

Usage Note:
Which is the optimal value for polling speed?
A value between 750-1000 ms is very good for chats, turn-based games and similar kind of applications. It adds minimum lag to the client responsiveness and it keeps the server CPU usage low.
Lower values (200-500 ms) can be used where a faster responsiveness is necessary. For super fast real-time games values between 50 ms and 100 ms can be tried.
With settings < 200 ms the CPU usage will grow significantly as the http connection and packet wrapping/unwrapping is more expensive than using a persistent connection. Using values below 50 ms is not recommended.

Since:
SmartFoxServer Pro v1.6.0

Version:
SmartFoxServer Pro

Examples
The following example shows how to set the polling speed.
CopyC#
Debug.WriteLine("Poll speed: " + smartFox.GetHttpPollSpeed());
smartFox.SetHttpPollSpeed(200);
See Also

Assembly: SmartFoxClientAPI_Silverlight (Module: SmartFoxClientAPI_Silverlight) Version: 1.0.0.0 (1.0.0.0)