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.8.0.0 (1.8.0)
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 under Universal Windows Platform)
  • WebSocketSecure: a secure websocket connection was established between the client and the server (not available under Universal Windows Platform)
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);       // Universal Windows Platform
See Also