Hi, I see that Smartfox Server sends list of Users to client automatically as default config.
If I have a room that contains 2k ~ 3k users same time (Eg: room lobby) and when a new user join room then server api will sends to that user all info about room as room name, room variables... and list of users (all) as binary data. So too much data has been sent to client that I don't need.
How to do disable it?
How to disable automatic send list of Users to Client?
Re: How to disable automatic send list of Users to Client?
If you don't need a list of users you probably don't need a Room either... how do users interact with each other?
Alternatively you may need an MMORoom which handles the user list based on the AoI (area of interest)
http://docs2x.smartfoxserver.com/Advanc ... /mmo-rooms
Let us know
Alternatively you may need an MMORoom which handles the user list based on the AoI (area of interest)
http://docs2x.smartfoxserver.com/Advanc ... /mmo-rooms
Let us know
Re: How to disable automatic send list of Users to Client?
Thanks!
I use room to general manager as a event room for user register. Each user only work with the server and has no interaction with other user, and the server can send info to all user in the Room. So i don't want the server send list of user, too much unnecessary data if the room contains a large users.
I use room to general manager as a event room for user register. Each user only work with the server and has no interaction with other user, and the server can send info to all user in the Room. So i don't want the server send list of user, too much unnecessary data if the room contains a large users.
Re: How to disable automatic send list of Users to Client?
If users don't interact with each others you can definitely avoid Rooms altogether.
Re: How to disable automatic send list of Users to Client?
MrHaka wrote:Thanks!
I use room to general manager as a event room for user register. Each user only work with the server and has no interaction with other user, and the server can send info to all user in the Room. So i don't want the server send list of user, too much unnecessary data if the room contains a large users.
You can use a zone extension for all that... For example... Below, I get all user data using a Zone extension after login... No rooms required.
Code: Select all
private function onLogin(e:SFSEvent):void {
trace("Logged in");
//Get user data - Goes to Zone extension!
var sfsDataObj:ISFSObject = SFSObject.newInstance();
sfsDataObj.putInt("dbId", Game.Main.userId);
sfs.send(new ExtensionRequest(GET_MY_DATA, sfsDataObj));
}
//Handle data from Zone extension...
private function onExtensionResponse(e:SFSEvent):void {
var Response:String = e.params.cmd;
var rawData:ISFSObject = e.params.params as ISFSObject;
var Data:ISFSObject = rawData.getSFSArray("Data").getSFSObject(0);
//Etc...
}
You don't need to have a lobby either... Just send a extension request to your Zone to find your player a suitable game or mmo room and join them directly to it. People want to play immediately and don't want to hassle with lobbies.
Who is online
Users browsing this forum: Stevenor and 113 guests