[Twisted-Python] DNS SRV support for Connectors

Jp Calderone exarkun at intarweb.us
Wed Jan 1 00:23:06 EST 2003

On Mon, Dec 30, 2002 at 12:47:04AM +0200, Tommi Virtanen wrote:
> 	Hi. I wanted to have SRV record (RFC 2782) support connecting
> 	to services. So here we go.
> 	The following patch adds a new Connector class that takes
> 	service (smtp, http, ldap, ..) and domain (example.com), looks
> 	for a DNS SRV record and falls back sanely if not found.
> 	itamar pointed out that this might be more suitable in
> 	twisted.names.client -- feel free to point out what is the
> 	"right" place.
> 	Please give feedback.

  Hooray. :)  One thing that concerns me is that these won't be serialized
correctly.  I -thought- you might be able to drop the resulting connector
into theApplication.tcpConnectors by hand, but at a closer look it doesn't
seem that would work.  Does anyone have any ideas on this?  Since
connectTCPService does depend on t.names, I agree with itamar that it isn't
appropriate for inclusion in t.internet, which rules out changing
Application to suit it specifically.  Perhaps a general interface for
user-specified connector functions?  Something like...

    app.connectWith(connectTCPService, 'service', 'domain', ...)

  so that the call info could be serialized and re-invoked on the next run.

  Good?  Bad?


"The problem is, of course, that not only is economics bankrupt but it has
 always been nothing more than politics in disguise ... economics is a form
 of brain damage."  -- Hazel Henderson
 12:00am up 16 days, 9:46, 4 users, load average: 0.08, 0.09, 0.08
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030101/767a4f36/attachment.pgp 

More information about the Twisted-Python mailing list