docs: function Connection(endpoint, options, connectionListener) {
    if (!(this instanceof Connection)) return new Connection(endpoint, options, connectionListener);
  
    stream.Duplex.call(this);
  
    if (endpoint && !(endpoint instanceof Endpoint)) {
      endpoint = new Endpoint(endpoint);
    }
    if (typeof options === 'function') {
      connectionListener = options;
      options = undefined;
    }
    this.endpoint = endpoint;
    this.options = options || {};
    if (typeof connectionListener === 'function') {
      this.on('connect', connectionListener);
    }
    this.status = {sent: 0, received: 0};
  
    this.on('_read_data', function (data) {
      this.push(data);
      this.status.received += data.length;
    });
  
    if (endpoint) {
      //connect
      connect.call(this);
    }
  }