MaxMessageSize

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
Mhollow
Posts: 24
Joined: 22 Feb 2012, 06:29
Location: Russia

MaxMessageSize

Post by Mhollow »

Hello!
in Flash API trace("max message size = " + sfs.maxMessageSize);
displayed:
max message size = 10000

So please tell me how can I change this value (on a server side I guess)?
Cause I need to send swf files from an extension to client much bigger then 10000 bytes...
Thanks!
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: MaxMessageSize

Post by itsmylifesoham »

hi,

i would like to make a point here.

please do not send such huge files from the extension! that way you are transaferring a huge message using the smartfox socket server.

please use your http server to deliver the client these swf files.
for eg: from your extension just send a message to client which contains the path of swf it should load.

let the client load that path over http inside their parent swf or something else.
Mhollow
Posts: 24
Joined: 22 Feb 2012, 06:29
Location: Russia

Re: MaxMessageSize

Post by Mhollow »

All I need - is to send swf files from extension to client around 200-300kb size.
Is this so critical size that makes me to deploy a http server?
I thought that Byte Arrays was designed especially for this task.
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: MaxMessageSize

Post by itsmylifesoham »

thats too huge , and will degrade your sfs server performance.

in one of bax's posts he clearly mentions this. the guy was trying to send 20 files of 30kb each and was complaining about dropped message problem. only 2 files were getting sent and none other. what bax said was that this is a big file size for socket server , http server is made for this purpose, and it makes sense to use http server for 200 -300 kb file size.
Mhollow
Posts: 24
Joined: 22 Feb 2012, 06:29
Location: Russia

Re: MaxMessageSize

Post by Mhollow »

Any comments from admins?

Cause in SFS2x docs mentioned :
***************************************
Byte Arrays
One special mention should go to the ByteArray type which provides a mean of transferring binary data to and from the server. This could be used to transfer small files, images, media files, encrypted data, etc. For example Flash developers could improve the security of their application by sending external SWF files via the socket which would go undetected when spying the HTTP traffic.
********************************

So this is EXACTLY what i want! To send some SMALL amount of files of SMALL size from server extension to client avoid deploying and using some third party servers such as http.
So, can I use this feature or not??
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: MaxMessageSize

Post by Lapo »

You can open the config/core.xml file and modify the size under the <maxIncomingRequestSize> tag.
All I need - is to send swf files from extension to client around 200-300kb size.
Is this so critical size that makes me to deploy a http server?
There's no need to deploy any http server because SFS2X already embed the excellent Jetty HTTP server.
If you plan to transfer lots of small files from the SFS sockets under a high traffic scenario (thousands of clients) I'd recommend using HTTP.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply