def pickServer(self): if self.override is None: overriddenHost, overriddenPort = None, None else: overriddenHost, overriddenPort = self.override if (overriddenHost is not None and (overriddenPort is not None or self.domain is None)): host = overriddenHost port = overriddenPort else: host, port = SRVConnector.pickServer(self) if overriddenHost is not None: host = overriddenHost if overriddenPort is not None: port = overriddenPort try: port = int(port) except ValueError: pass assert host is not None if port is None: port = 389 return host, port
def pickServer(self): host, port = SRVConnector.pickServer(self) if not self.servers and not self.orderedServers: # no SRV record, fall back.. port = int(config()['xmpp']['port']) return host, port
def pickServer(self): host, port = SRVConnector.pickServer(self) if not self.servers and not self.orderedServers: # no SRV record, fall back.. port = 5222 return host, port
def pickServer(self): assert self.servers is not None assert self.orderedServers is not None if not self.servers and not self.orderedServers: # no SRV record, fall back.. return self.domain, 2855 return SRVConnector.pickServer(self)
def pickServer(self): """ Pick a server and port to make the connection. """ host, port = SRVConnector.pickServer(self) if port == 5223 and ssl: context = ssl.ClientContextFactory() context.method = ssl.SSL.SSLv23_METHOD self.connectFuncName = 'connectSSL' self.connectFuncArgs = (context,) return host, port
def pickServer(self): """ Pick a server and port to make the connection. """ host, port = SRVConnector.pickServer(self) if port == 5223 and ssl: context = ssl.ClientContextFactory() context.method = ssl.SSL.SSLv23_METHOD self.connectFuncName = 'connectSSL' self.connectFuncArgs = (context, ) return host, port
def pickServer(self): """ Pick a server and port to make the connection. """ host, port = SRVConnector.pickServer(self) if not self.servers and not self.orderedServers: # no SRV record, fall back.. port = 5222 if port == 5223 and xmlstream.ssl: context = xmlstream.ssl.ClientContextFactory() context.method = xmlstream.ssl.SSL.SSLv23_METHOD self.connectFunc = 'connectSSL' self.connectFuncArgs = (context) return host, port
def pickServer(self): host, port = SRVConnector.pickServer(self) print 'Resolved _%s._%s.%s --> %s:%s' % (self.service, self.protocol, self.domain, host, port) return host, port
def pickServer(self): host, port = SRVConnector.pickServer(self) print('Resolved _%s._%s.%s --> %s:%s' % (self.service, self.protocol, self.domain, host, port)) return host, port
def pickServer(self): host, port = SRVConnector.pickServer(self) if not self.servers and not self.orderedServers: port = 5222 return host, port