More specifically I have to send a lot of data to the client to describe actions to be taken to login.
What I would like to do is to somehow send SFSObject as an argument to loginError event.
I want to write something like that on server side
Code: Select all
ISFSObject reason = new SFSObject();
reason.putUtfString("message", "You're late");
reason.putUtfString("action", "Come back later");
reason.putInt("hoursToWait", 10);
SFSErrorData errorData = new SFSErrorData(SFSErrorCode.GENERIC_ERROR);
errorData.setParams("reason", reason);
throw SFSLoginException("Too late", errorData);
And then, get reason as SFSObject on client side when processing loginError event. Right now I'm going to send JSON string to client, which is weird, considering, that SmartFox has SFSObject for such things.
Can I do that somehow
P. S. I wanted to make some other event first as a workaround, but as far as I understand I can't send any Zone Events before I have successfully logged in.