I use FMS development webgame. 2 application. 1: room 2: game.
room to maintain 24-hour continuous connection. game is the player number 0, shutdown ()
That there are about 400 people online when the room occupied by the memory 500-800M. game only 100M
+
Players reduction, room memory will not reduce still remain in the 500-800M
Is there relevant solutions or comments?
//
//
//
//
function userLogon(_newClient, userType, userName, userPsd) {
var Logon = new LoadVars();
Logon.errorCount = 0;
Logon.onLoad = function(success) {
if (success) {
//trace("---------------------------");
if (this.returnInfo == "ok") {
application.acceptConnection(_newClient);
} else {
var err = new Object();
err.message = "error";
application.rejectConnection(_newClient, err);
}
} else {
this.errorCount++;
if (this.errorCount>=3) {
trace("error");
var err = new Object();
err.message = "error";
application.rejectConnection(_newClient, err);
} else {
Logon.sendAndLoad(sendUrl, Logon, "POST");
}
}
};
var sendUrl = logonUrl+"userName="+userName+"&userPsd="+userPsd+"&";
//trace("logonURL="+sendUrl);
Logon.sendAndLoad(sendUrl, Logon, "POST");
}
//
//
//
The above is my with. Net code for examples of interactive programs.
sendandload in the "function" . To do an asynchronous callback. Used many times in such a way, such
as sending data, user exit, replace the image and so on ... I have used this method
Is it because such an approach lead to memory footprint is too large?