Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#26 closed enhancement (fixed)

wokkel.client.clientCreator should accept a connector class as an argument

Reported by: jack Owned by: ralphm
Priority: normal Milestone:
Component: generic Keywords:


On Mac OS X there is a bug that prevents SRVConnector from working properly. I have written it up in Twisted ticket #3456.

To work around this I need to use a custom connector, but clientCreator does not accept the connector to use as an argument. To get around *that* I have to implement my own clientCreator.

It would be helpful if you could pass in a connector wherever one is needed.

Change History (3)

comment:1 Changed 14 years ago by jack

Here's what I'm using to work around the bug currently. Can we get this into wokkel and into twisted words?

class XMPPConnector(SRVConnector):
    """Connector that replaces xmpp-client with port 5222 if SRV lookup

    This is needed to work around buggy OSes that still use jabber-client
    in /etc/services (OS X 10.5.x, I'm looking at you).

    def pickServer(self):
	host, port = SRVConnector.pickServer(self)
	if port == 'xmpp-client':
	    port = 5222
	return host, port

def createClient(factory):
    domain =
    c = XMPPConnector(reactor, 'xmpp-client', domain, factory)
    return factory.deferred

comment:2 Changed 13 years ago by ralphm

  • Resolution set to fixed
  • Status changed from new to closed

(In [188]) Use fallback port 5222 for failed SRV lookups for clients.

Author: ralphm. Reviewer: jack. Fixes #26.

comment:3 Changed 13 years ago by ralphm

(In [189]) Also have XMPPClient use the new connector.

Re #26.

Note: See TracTickets for help on using tickets.