hello,
i want to close old connection when 1 user login on 2 device
My mean is:
onAuth (options){
return true;
}
requestJoin (options: any, isNew: boolean) {
return true;
}
onJoin (client) {
if(userId in this.players){
var old_client = this.players[userId];
old_client.close();
}
this.players[userId] = client;
}
How to do this?