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
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Message exceed allowed max length

Post by Elgueu »

Hello =)

I'm trying to save 27x27 arrays with sendValues, but i get :

2006/06/04 14:32:55.634 - [ WARNING ] [id: 12] (SmartFoxServer.readIncomingMessages): Message exceed allowed max length! (19598 bytes) from > /*.*.*.*

How could i bypass the protection, or change this allowed max length ? In fact i must save 3 arrays of 27x27 which is around 60 000 bytes.

(Nb : i saw another topic with the same name, but without any solution)
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Post by Elgueu »

Oh ok, i've just seen the "MaxMsgLen" in config.xml ^^
Is there any way to make a difference between the message length sent by an user, and the message length sent by an app ? I would like to keep a limit for the user messages, but be allowed to save my arrays without limits...
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

<MaxMsgLen> limits the number of bytes that a client can send.
This is important for obvious security reasons.

There's no limit to the amount that is being sent from the server.
How could i bypass the protection, or change this allowed max length ? In fact i must save 3 arrays of 27x27 which is around 60 000 bytes.
Sending all that data from the client isn't a good practice, unless the message is sent only a few times. Anyways you will need to allow at least 60kb of data in the <MaxMsgLen> to allow all that data to pass
Lapo
--
gotoAndPlay()
...addicted to flash games
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Post by Elgueu »

My "map arrays" are sent to the client from the server, and there's no problem from this side. But i also have an admin "map editor" and i need to send back to the server these same "map arrays", just a few times.

My question is : is there any way to make a difference between the <MaxMsgLen> used in my public applications where i just need a few bytes of data, and the <MaxMsgLen> used in an "admin application" where i need to send huge amount of datas to the server ? I would like to keep some security and not always allow 60kb of client data...
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

no, for the moment we don't provide a per-user security scheme.

You could install a 2nd instance of the server only for admin purposes, allowing more data to be sent by the client.
The 2nd instance would be only used with your admin application
Lapo
--
gotoAndPlay()
...addicted to flash games
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Post by Elgueu »

Hm ok i see. Thank you =)
Post Reply