'Start connection to remote server.'

def connect(self):

    self.factory.doStart()
    self.factory.startedConnecting(self)
    if (not self.servers):
        if (self.domain is None):
            self.connectionFailed(error.DNSLookupError('Domain    is    not    defined.'))
            return
        d = client.lookupService(('_%s._%s.%s' % (nativeString(self.service), nativeString(self.protocol), self.domain)))
        d.addCallbacks(self._cbGotServers, self._ebGotServers)
        d.addCallback((lambda x, self=self: self._reallyConnect()))
        if self._defaultPort:
            d.addErrback(self._ebServiceUnknown)
        d.addErrback(self.connectionFailed)
    elif (self.connector is None):
        self._reallyConnect()
    else:
        self.connector.connect()
