SmartFoxServer Silverlight API
GetConnectionMode Method
Namespaces ► SmartFoxClientAPI ► SmartFoxClient ► GetConnectionMode()()()
Get the current connection mode.
Declaration Syntax

C# | Visual Basic | Visual C++

    public string GetConnectionMode()

    Public Function GetConnectionMode As String

    public:
    String^ GetConnectionMode()

Return Value
The current connection mode, expressed by one of the following constants: CONNECTION_MODE_DISCONNECTED (disconnected), CONNECTION_MODE_SOCKET (socket mode), CONNECTION_MODE_HTTP (http mode).
Remarks

Since:
SmartFoxServer Pro v1.6.0

Version:
SmartFoxServer Pro

Examples
The following example shows how to check the current connection mode.
CopyC#

     SFSEvent.onConnection += OnConnection;

    smartFox.Connect("127.0.0.1", 9339);

    public void OnConnection(bool success, string error)
    {
        Debug.WriteLine("Connection mode: " + smartFox.GetConnectionMode());
    }

See Also
CONNECTION_MODE_DISCONNECTED
CONNECTION_MODE_SOCKET
CONNECTION_MODE_HTTP
Connect(String, Int32)

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