[Twisted-Python] DNS SRV support for Connectors

Tommi Virtanen tv at twistedmatrix.com
Tue Dec 31 15:32:45 EST 2002

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.
> 	The patch also fixes the output of SRV-using example; it used
> 	to not output the interesting bits.
> 	The patch is attached, and the latest version is at
> 	http://www.twistedmatrix.com/users/tv/connectTCPService.patch

	Please comment. I'm not familiar enough on what *YOU* want to
	do with reactors to know the right place for this, and whether
	e.g. a function like connectTCPService() should exist at all
	(and if so, how to implement it for other reactors).

	If I get no comments, I will

	1. Commit the change to TCPConnector that makes it accept
	   service names as port.

	2. Find and wear my asbestos underwear.

	3. Commit the TCPServiceConnector class.

	4. Sit and wait for flames.

	5. Commit the connectTCPService function.

	6. Run away.

:(){ :|:&};:

More information about the Twisted-Python mailing list