Dispatched in response to the Connect(String, Int32) request.
The connection to SmartFoxServer may have succeeded or failed: the success parameter must be checked.
The connection to SmartFoxServer may have succeeded or failed: the success parameter must be checked.


Version:
SmartFoxServer Basic / Pro

The following example shows how to handle the connection result.
CopyC#

SFSEvent.onConnection += OnConnection; smartFox.Connect("127.0.0.1", 9339); public void OnConnection(bool success, string error) { if (success) Debug.WriteLine("Connection successful"); else Debug.WriteLine("Connection failed. Reason: " + error); }
