code: function Endpoint(fnWrite, key, port, hostname, opts) {
      assert(_.isFunction(fnWrite));
      assert(_.isString(key));
  
      _.extend(this, EventEmitter);
      _.bindAll(this, _.functionsIn(this));
      opts = opts || {};
  
      if (!fnWrite || typeof fnWrite !== 'function') {
        throw new Error("Endpoint `fnWrite` parameter is not defined or is not a function");
      }
  
      if (!key) {
        throw new Error("Endpoint `key` parameter is not defined");
      }
  
      if (!port) {
        throw new Error("connect(port, hostname) port must be defined");
      }
      if (!hostname) {
        throw new Error("connect(port, hostname) hostname must be defined");
      }
  
      this.key = key;
  
      /**
       * redsmin ssl connection server hostname
       * @type {String}
       */
      this.hostname = hostname;
  
      /**
       * redsmin ssl connection server hostname
       * @type {String}
       */
      this.port = port;
  
      /**
       * redsmin ssl connection server hostname
       * @type {String}
       */
      this.uri = this.hostname + ':' + this.port;
  
      this.auth = opts.auth;
      this.handshaken = false;
      this.connected = false;
      this.connecting = false;
      this.socket = null;
      this.fnWrite = fnWrite;
  
      this.handshakenBackoff = backoff.fibonacci({
        initialDelay: opts.initialTimeout || 500,
        maxDelay: opts.maxTimeout || 10000
      });
  
      this.handshakenBackoff.on('backoff', this.reconnect);
  
      this.reconnectBackoff = backOff(this.reconnect, {
        min: 500,
        max: 4000,
        inc: 250
      });
    }
docs: Endpoint (redsmin)
  @param {Function} fnWrite `callback(data)` where to write datas from the endpoint
  @param {String} key             Connection key
  @param {Number,String} port     Connection-server port
  @param {String} hostname     Connection-server hostname
  @param {Object} opts    Optional parameters