Message exceed allowed max length!

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
MoonChild
Posts: 7
Joined: 04 Dec 2009, 15:06
Location: Netherlands

Message exceed allowed max length!

Post by MoonChild »

I'm currently sending objects that have 3 arrays. And at some point when there are around 20 to 30 of those objects on screen. I exceed the max allowed length. Now I heard that sending objects is bigger then arrays. So would sending one array with 3 arrays be better? Or 1 string with all those values, and divide that string at the receiving side?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

You can configure the max allowed message size by opening your config.xml and changing the value for <MaxMsgLen> which by default is set to 4096 (4Kb)
Lapo
--
gotoAndPlay()
...addicted to flash games
MoonChild
Posts: 7
Joined: 04 Dec 2009, 15:06
Location: Netherlands

Post by MoonChild »

Lapo wrote:You can configure the max allowed message size by opening your config.xml and changing the value for <MaxMsgLen> which by default is set to 4096 (4Kb)
Ah that's good to hear, because 4kb is hardly anything! Do you also know what's the smallest thing to send?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Take in consideration that usually multiplayer apps send small bits of data in contrast with http-server that transfer entire documents or files. A default 4Kb limit for request is a good one :)
In general I would avoid allowing more than 64Kb for client requests as this is also a "shield" againts potential hacking attacks

There is no limit on how small a request can be (if that was the question)
Lapo
--
gotoAndPlay()
...addicted to flash games
MoonChild
Posts: 7
Joined: 04 Dec 2009, 15:06
Location: Netherlands

Post by MoonChild »

Lapo wrote:Take in consideration that usually multiplayer apps send small bits of data in contrast with http-server that transfer entire documents or files. A default 4Kb limit for request is a good one :)
In general I would avoid allowing more than 64Kb for client requests as this is also a "shield" againts potential hacking attacks

There is no limit on how small a request can be (if that was the question)
Does that limit go for everything, or for each package you're sending? And my question was about:
Now I heard that sending objects is bigger then arrays. So would sending one array with 3 arrays be better? Or 1 string with all those values, and divide that string at the receiving side?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

That is the limit for one client request. All requests exceeding the limit are discarded.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply