Code: Select all
smartFoxClient.AddEventListener(SFSEvent.CONNECTION_RETRY, OnConnectionRetry);
smartFoxClient.AddEventListener(SFSEvent.CONNECTION_RESUME, OnConnectionResume);
and
Code: Select all
void OnConnectionRetry(BaseEvent evt) {
Debug.Log("Connection retry");
// Freeze your GUI and provide some feedback to the Player
}
void OnConnectionResume(BaseEvent evt) {
Debug.Log("Connection resume");
// Unfreeze the GUI and let the player continue with the game...
}
Then I execute smartFoxClient.KillConnection();. After that I immediately see "Connection retry" and "Connection resume" in console. However, there are also many errors concerning sending data to SFS (saying that I'm trying to use smartFoxClient set to null) after these events. In fact, in admin panel I see that user disappears, so connection was not really resumed properly. My question is why? What am I doing wrong? Do I have to login manually when connection resume is fired? I will appreciate your quick response because it's very important for me to implement.