docs: function publish(conn, channel, message) {
    var c = 0
      , indices = []
      , len
      , k
      , re;
  
    // exact channel match
    for(k in this._channels) {
      // found the channel
      if(k === channel) {
        indices = this._channels[k].slice(0);
        this.emit(
          PUBSUB.PUBLISH, conn, channel, indices,
            [PUBSUB.MESSAGE, channel, message]);
        break;
      }
    }
  
    len = indices.length;
  
    // reset indices for patterns
    // required to prevent channel subscribers
    // from also receiving pmessage events
    indices = [];
  
    // test against pattern channels
    for(k in this._patterns) {
      // pattern should be pre-compiled
      re = this._patterns[k].re;
      if(re.test(channel)) {
        indices = indices.concat(this._patterns[k]);
        this.emit(
          PUBSUB.PUBLISH, conn, channel, indices,
            [PUBSUB.PMESSAGE, k, channel, message]);
      }
    }
  
    len += indices.length;
  
    return len;
  }