code: function Ps4Socket(config) {
      this.config = {
          modelAppendHostname: true,
          autoLogin: true,
  
          ...config,
      };
  
      this.packets = new PacketFactory();
      this.loggedIn = false;
      this._loginResult = null;
  
      // eslint-disable-next-line
      if (this.config.host) {
          this.connect(this.config.host, this.config.port);
      }
  }
docs: Ps4Socket constructor
  
  Events:
  connected: Connected to the PS4
  ready: This socket is ready to be used.
  If you provide a callback to the factory, it
  will be fired after this event occurs. By default,
  this will be fired after login, but if autoLogin
  is `false`, it will be called after the handshake
  is completed
  packet: Raw Packets. Probably better to wait for
  specific events
  disconnected: Connection with PS4 lost
  error: Of course
  
  Parsed packet events:
  login_result: Immediately after "ready" on successful login,
  this will have a "result" field that should be 0 on success.
  On failure, will also have a string "error" field indicating
  the meaning of the result code.
  status: Emitted periodically with an int "status" field. It is unknown
  what this field means, but may simply be a heartbeat
  start_osk_result: Emitted in response to startOsk.
  start_title_result: Emitted in response to startTitle. Has an int
  "status" field.
  standby_result: Emitted in response to requestStandby. Has an int
  "status" field.
  
  Low level packets:
  shello: Server's HELLO packet, as part of the handshake. Has
  "status" field which should normally be 0; a non-zero
  value means an error, and that the connection will be
  closed and the error emitted. If you disable autoLogin,
  this is a good opportunity to manually login.
  
  @param config TODO