docs: function doSubscribe(id, prop, target, conn, channels) {
    var i
      , client = conn.client
      , key                     // string channel id
      , channel                 // array of subscribed clients
      , psub = id === (PUBSUB.PSUBSCRIBE);
  
    channels = channels.map(function(channel) {
      return '' + channel;
    })
  
    // keep track of the pubsub on the client
    if(!client.pubsub) {
      client.pubsub = new ClientPubSub();
    }
  
    // can subscribe to multiple channels at once
    // iterate all the channels the client requested
    for(i = 0;i < channels.length;i++) {
      key = channels[i];
      if(!target[key]) {
        this._count[prop].total++;
        this._stats['pubsub_' + prop]++;
      }
      // reference or create the channel
      channel = target[key] = target[key] || [];
      //if(!channel.length) {
        //channel.type = psub ? PUBSUB.PMESSAGE : PUBSUB.MESSAGE;
      //}
      // compile pattern on subscribe
      if(psub && !channel.re) {
        channel.re = Pattern.compile(key);
      }
  
      // cannot subscribe twice to the same channel
      if(!~channel.indexOf(client.index)) {
        channel.push(client.index);
        this._count[prop].subscribers++;
      }
  
      client.pubsub[prop].push(key);
  
      conn.write([id, key, client.pubsub[prop].length]);
    }
  }