Bandwidth Consumption Practices

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
Gloryride
Posts: 17
Joined: 26 Oct 2010, 14:50

Bandwidth Consumption Practices

Post by Gloryride »

I searched for this but couldn't find it exactly.


I need to synchronize time between clients in a real-time game. I've identified and implemented 2 different ways of doing this, but need help determining which is best for bandwidth:

Version 1

Code: Select all

Have the host update their time to a RoomVariable that the remaining clients are synched with on ROOM_VARIABLES_UPDATE.
Version 2

Code: Select all

Have the host send an ObjectMessageRequest that all the other clients are listening for and update accordingly.
I suspect they'll more-or-less be equal, but couldn't confirm that ObjectMessageRequest is sent to the server since what I'm really wanting to do is talk to the other clients (and ignore any uneccessary host->server communications where possible) and ObjectMessageRequest allows me to do just that. However, it is sent using SmartFoxServer.send() method which is documented as //Sends a request to the server.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

All requests are sent to the server which then dispatches them to the involved clients. Direct connection is not possible. So the two methods behave essentially in the same way.
Paolo Bax
The SmartFoxServer Team
Post Reply