I used C++ SFS2X Client Api.
When I sent params value of UNICODE STRING, the server show this Error:
Error deserializing request: java.nio.BufferUnderflowException
My client Code For Sending Data To server:
Code: Select all
boost::shared_ptr<ISFSObject> params (new SFSObject());
params->PutUtfString("test", ("helloសាកល្បង");
boost::shared_ptr<IRequest> request (new ExtensionRequest("cmi", params));
GameServer::getSingleton().getSmartFox()->Send(request);
------MY SERVER CODE-------
When I sent Unicode data from server to client, the client receive correct ascii value part, but incorrect unicode value
Code: Select all
ISFSObject notiparams = SFSObject.newInstance();
notiparams.putUtfString("notiMSG", "Welcome ... សាកល្បង");
this.send("notiRMFF", notiparams, user);
Client Code to receive data from server
Code: Select all
boost::shared_ptr<string> cmdx = ((boost::static_pointer_cast<string>)(param->GetUtfString("notiMSG")));
CCLog("Server Mess:%s",cmdx->c_str());
The client will correctly received "Welcome ..." but the unicode part is wrong (/303/302)
Any suggestion?
Thanks;