[Question]How to get sfsobject in custom login

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

alonew
Posts: 8
Joined: 14 Oct 2012, 20:38

[Question]How to get sfsobject in custom login

Postby alonew » 16 Nov 2012, 15:07

I'm using Custom Login.

it's client code

ISFSObject sfsob = new SFSObject();
sfsob.PutByte("a", (byte)requestcode.checklogin);
sfs.Send(new LoginRequest("aaaa", "bbb", "RFOS", sfsob));

it's server code

public void handleServerEvent(ISFSEvent evt) throws SFSException
{
String accountid=(String)evt.getParameter(SFSEventParam.LOGIN_NAME);
String accountpwd=(String)evt.getParameter(SFSEventParam.LOGIN_PASSWORD);
}

The Question is .How can i get the sfsob in handleServerEvent? I don't know how to get the sfsob? by SFSEventParam? Help me,please :?:
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [Question]How to get sfsobject in custom login

Postby Lapo » 16 Nov 2012, 15:58

These are all the params of the event:

Code: Select all

SFSEventParam.ZONE: the Zone ( Zone )
SFSEventParam.SESSION: the User session ( Session )
SFSEventParam.LOGIN_NAME: the User name ( String )
SFSEventParam.LOGIN_PASSWORD: (optional) the password ( String )
SFSEventParam.LOGIN_IN_DATA: (optional) the custom user data ( SFSObject )
SFSEventParam.LOGIN_OUT_DATA: (optional) the outgoing custom object ( SFSObject )


Check the docs for further clarifications:
http://docs2x.smartfoxserver.com/api-do ... tType.html
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 148 guests