'Connects to a daemon process.
:param host: str, the hostname of the daemon
:param port: int, the port of the daemon
:param username: str, the username to login with
:param password: str, the password to login with'

def connect(self, host=u'127.0.0.1', port=58846, username=u'', password=u''):

    self.transfer.connect((host, port))
    if ((not username) and (host in (u'127.0.0.1', u'localhost'))):
        (username, password) = self._get_local_auth()
    self.remote_call(u'daemon.login', username, password).get()
    self._introspect()
