docs: def _initialize(self):
          '''Performs a IPC protocol handshake.'''
          credentials = (self.username if self.username else '') + ':' + (self.password if self.password else '')
          credentials = credentials.encode(self._encoding)
          self._connection.send(credentials + b'\3\0')
          response = self._connection.recv(1)
  
          if len(response) != 1:
              self.close()
              self._init_socket()
  
              self._connection.send(credentials + b'\0')
              response = self._connection.recv(1)
              if len(response) != 1:
                  self.close()
                  raise QAuthenticationException('Connection denied.')
  
          self._protocol_version = min(struct.unpack('B', response)[0], 3)