Trap The Duplicate Logging On FMS, LoggOff Old One And Accept New Instance.


hi all,

i need on following topic of fms 2.0.

on fms server want trap duplicate logging, logoff old 1 , accept new instance.

the scenario this, if user logged in name “ wins” on fms application office, after time came home , want logging again.
i want disconnect or logoff instance of application logged in office , allow him logging home.

actually want implement functionality yahoo messenger.
yahoo messenger gives facility login system , logoff previous instance.

so, tell me have achieve this.

thanks

onappstart intitialize object hold connected clients, maybe called userlist:
application.onappstart = function(){
this.userlist = {};
}

then when logs in, of course pass in username. put client in userlist username.
application.onconnect = function(newclient, username){
this.acceptconnection(newclient);
this.userlist[username] = newclient;
}

then can modify code boot old client if username in use:

application.onconnect = function(newclient, username){
if(this.userlist[username]){
this.disconnect(this.userlist[username]);
}
this.acceptconnection(newclient);
this.userlist[username] = newclient;
}

see if works ya.


More discussions in Adobe Media Server


adobe

Comments