Page 1 of 1

May be it's just a little bug ???

Posted: 11 Oct 2007, 14:20
by ecliptica
Hi everyone ! And First of all, congratulations for all Smartfox can do :-)

I try to use it...and I meet a little problem.
When I use :

smartfox.sendObject({my_array:my_array});

I want to send the Array "my_array" to the server...
It works, for example when my_array is an array with 50 elements...
Unfortunately, when there is more than 80elements in "my_array", it doesn't work anymore ...

Is it a bug ? Is there a limit about the size of arrays sent via "sendObject" ?
Or is it a problem from smartfox.onObjectReceived ?

or is it just a problem somewhere in my scripts ? lol

thanks a lot

Posted: 11 Oct 2007, 16:26
by Lapo
There's a limit to the size of client request. By default it is set to 4096 byes ( = 4Kb ). It's likely that your object exceeds that size and the message gets discarded by the server. I believe that an error message should be logged in your log files when this happens

HTH

p.s. = the limit can be changed in the config.xml file

thank you

Posted: 23 Oct 2007, 09:47
by ecliptica
Lapo wrote:There's a limit to the size of client request. By default it is set to 4096 byes ( = 4Kb ). It's likely that your object exceeds that size and the message gets discarded by the server. I believe that an error message should be logged in your log files when this happens

HTH

p.s. = the limit can be changed in the config.xml file
That's it !! ...If I change the limit in the config.xml file, it works better ! Thanks a lot ...

...and just another stuff (may be it's something like the limit in the config.xml) : When 2 multiusers play a game, as one in the example files, when one player doesn't make any move , it seems to be disconnected ... Is there a limit of time when one of the two players don' t make any move ?

thank you ...

Posted: 23 Oct 2007, 09:58
by Lapo
Change the setting of maxIdleTime value in config.xml
It's expressed in seconds

Posted: 24 Oct 2007, 08:59
by ecliptica
Lapo wrote:There's a limit to the size of client request. By default it is set to 4096 byes ( = 4Kb ). It's likely that your object exceeds that size and the message gets discarded by the server. I believe that an error message should be logged in your log files when this happens

HTH

p.s. = the limit can be changed in the config.xml file
hi again, I just need a confirmation because I haven't seen it in the docs.

If I want an unlimited size for the client request , should I write this , in the config.xml, with " -1" ? >>
<MaxMsgLen>-1</MaxMsgLen>

Posted: 24 Oct 2007, 12:02
by Lapo
Nope you should set an higher value.
NOTE: Think twice before setting a very high value because this would allow a malicious user to send very big garbage requests.