Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

一个channel可以无限制的添加用户吗? #827

Closed
lcsoftware opened this issue Apr 24, 2016 · 2 comments
Closed

一个channel可以无限制的添加用户吗? #827

lcsoftware opened this issue Apr 24, 2016 · 2 comments

Comments

@lcsoftware
Copy link

一个channel可以无限制的添加用户吗?

@whtiehack
Copy link
Contributor

/**
 * Add user to channel.
 *
 * @param {Number} uid user id
 * @param {String} sid frontend server id which user has connected to
 */
Channel.prototype.add = function(uid, sid) {
  if(this.state > ST_INITED) {
    return false;
  } else {
    var res = add(uid, sid, this.groups);
    if(res) {
      this.records[uid] = {sid: sid, uid: uid};
      this.userAmount =this.userAmount+1;
    }
    addToStore(this.__channelService__, genKey(this.__channelService__, this.name), genValue(sid, uid));
    return res;
  }
};

yes, infinite.

@fantasyni
Copy link
Member

对的,用channel store

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants