Click or drag to resize

SmartFoxConnectionMode Property

Returns the current connection mode after a connection has been successfully established.

Namespace:  Sfs2X
Assembly:  SmartFox2X (in SmartFox2X.dll) Version: 1.7.11.0 (1.7.11)
Syntax
C#
public string ConnectionMode { get; }

Property Value

Type: String
Remarks
Possible values are:
  • HTTP: a tunnelled http connection (through the BlueBox) was established between the client and the server
  • Socket: a regular socket connection was established between the client and the server
  • WebSocket: a websocket connection was established between the client and the server (not available in Windows / Windows Phone)
  • WebSocketSecure: a secure websocket connection was established between the client and the server (not available in Windows / Windows Phone)
Examples
The following example shows the current connection mode:
Console.WriteLine("Connection mode: " + sfs.ConnectionMode);                        // .Net / Unity
System.Diagnostics.Debug.WriteLine("Connection mode: " + sfs.ConnectionMode);       // native windows / windows phone
See Also