[Twisted-Python] multiple connectTCP bindaddress problem

Itamar Shtull-Trauring itamar at itamarst.org
Sun Nov 7 18:12:18 MST 2004


On Mon, 2004-11-08 at 12:00 +1100, Chris Laws wrote:

> I'm using a TCP connection which I think eventually uses
> twisted.internet.tcp.Port. In there it creates a 
> socket and assigns the SO_REUSEADDR option if 'posix'.

connectTCP doesn't use tcp.Port, tcp.Port is internal code of listening
(server) sockets.

> Is this the case? Is it not supported by Windows, or just poorly supported by Windows, hence not used by 
> Twisted?

It has some wonky behaviour, so I disabled it, but again, that was for
server sockets.

Your use case is "I want to have multiple TCP clients with same local
IP, port", yes? This should only be necessary if:

1. You have tens of thousands of connections at once.

2. Your client has to be on a certain port to work, and you have
multiple clients from same machine. If you are designing a new protocol
doing this is a bad idea.

Which of these is it in your case?






More information about the Twisted-Python mailing list