pomelo
pomelo copied to clipboard
Session.data will be automaticlly sync to Other servers?
If there is a data save in session, and I only use this session.data in the special type of server. At this situation, though it's not supposed, will the session.data to automaticlly sync to Other all type of servers?
If you want to sync data session to another server so call method pushAll or push.
EG:
session.bind(player_id);
session.set('player_id', player_id);
/*sesssion close*/
session.on('closed', on_user_leave.bind(null, self.app));
/*push all session*/
session.pushAll();
/*or push*/
//session.push('player_id', function(err) {
// if(err) {
// console.error('set rid for session service failed! error is : %j', err.stack);
// }
//});