How to deal with SFS Pro server sending back mangled room list?

Post here all your questions related with SmartFoxServer Java API

Moderators: Lapo, Bax

Posts: 1
Joined: 18 Nov 2016, 21:25

How to deal with SFS Pro server sending back mangled room list?

Postby ThatGuyWithThatApp » 18 Nov 2016, 22:09

We run an app with Android (Java), iOS, and Flash clients. We have four servers running SFS PRO 1.6.18. Every so often, a server suffers from an ailment wherein every request for a room list sent by a Java client either gets no response or responds with truncated (unparseable) XML. The effect of this is that Android clients become useless, since almost every Android client-server interaction is preceded by a check to see if the room list was downloaded. A reboot of the server solves the problem, but because most of our customers use Flash and iOS we generally just make the Android users sad until all rooms on the server are empty and we can reboot safely.

The Flash and iOS clients are able to use these servers without a problem. I don't know if this is because those SFS libraries aren't quite so strict about checking for a room list, or the server is for some reason sending them nicer XML.

This sounds like a server problem, but I'm asking in this forum because the iOS and Flash apps are running smoothly and I'm hoping it's a fix I can implement on the Android side.

Is the nature of this issue apparent and solvable?
User avatar
Site Admin
Posts: 22603
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to deal with SFS Pro server sending back mangled room list?

Postby Lapo » 19 Nov 2016, 08:41

I don't think this has anything to do with the server, since iOS and Flash clients don't suffer from the problem.

What I suspect is that you're using very large room lists that probably exceed the buffer size of the Java client API. If I remember correctly this is 32KB and if your Room List is bigger than that the XML will result as truncated.

Here's a solution for that:

...addicted to flash games

Return to “Java2SE / Android Client API”

Who is online

Users browsing this forum: No registered users and 0 guests