code: function Actor(stream) {
    if (!(this instanceof Actor)) return new Actor(stream);
    var that = this;
    this.parser = new amp.Stream;
    this.parser.on('data', this.onmessage.bind(this));
    stream.pipe(this.parser);
    this.stream = stream;
    this.callbacks = {};
    this.ids = 0;
    this.id = ++ids;
    this.secret_key = null;
    Actor.emit('actor', this);
  }
docs: Initialize an actor for the given `Stream`.
  
  @param {Stream} stream
  @api public