[Twisted-Python] APIs changes for TCP and UDP

Itamar Shtull-Trauring twisted at itamarst.org
Wed Jun 5 06:43:27 EDT 2002

1) Client TCP connects should be allowed to bind to a specific interface and 
port, e.g.:

   reactor.clientTCP('example.com', 80, p, bindAddress=('', 999))

2) UDP Ports's API should be formalized. Basically, the way UDP works from 
what I can see is that you create a Port, and for client connections you 
call the Port's createConnection(addr) method. Currently this returns a 
transport which is hooked up to a protocol, which is silly, it should return 
the protocol instance it contructs:

   port = reactor.listenUDP(8080, dnsFactory)
   clientProtocol = port.createConnection(("example.com", 53))

More information about the Twisted-Python mailing list