Network package sizes

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

Moderators: Lapo, Bax

User avatar
janheuninck
Posts: 68
Joined: 23 Nov 2011, 01:35
Location: Vancouver BC, Canada

Network package sizes

Postby janheuninck » 30 Oct 2012, 20:35

Hi guys,

Is there a way to log the size of the incoming and outgoing packages on the server (per client)? I'd like to figure out the size of the ISFSObjects I'm sending to the clients.


Thanks
Jan
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Network package sizes

Postby rjgtav » 30 Oct 2012, 23:58

Hi,

The SFSObject has two helpful methods which lets you see exactly what you're sending to the client. The methods I'm talking about are the getDump() and the getHexDump(). I can't recall exactly which one does that, but I can assure you that one of them shows the size of the object in bytes (maybe it's the getHexDump()).

And next time please post SFS2X related questions on the SFS2X Questions forums. This forum where you posted is for SmartFoxServer Pro related questions only.

Cheers
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Network package sizes

Postby Lapo » 31 Oct 2012, 09:27

You can change the log settings to DEBUG level to see the dump and sizes of each packet.
Just edit the config/log4j.properties modifying this entry:

Code: Select all

log4j.category.com.smartfoxserver=DEBUG ...etc...
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 52 guests