[Twisted-Python] multiple connectTCP bindaddress problem

I only have about 30 servers which I connect the client(s) with. There are between 1 and 10 client applications which connect to the 30 servers, though it is very unlikely that more than two client side applications would be running at any one time. I have control over the ports I am using (within reason) so the client(s) can go on any port I choose. I simply wanted the clients to use the same local port when establishing their connections with the servers to reduce the likelyhood for conflicting use of ports. (We have a few conflicting uses of ports on this project so I wanted mine to use a few as possible). Anyway from your information I will go with the port-per-server implementation. 30 ports for the client isn't much anyway. Thanks for your help, Chris

On Mon, 2004-11-08 at 23:04 +1100, Chris Laws wrote:
client(s) can go on any port I choose. I simply wanted the clients to use the same local port when establishing their connections with the servers to reduce the likelyhood for conflicting use of ports.
? That doesn't really make sense to me. The operating system will give clients ephemeral ports if you don't specify one, the clients won't ever conflict.
(We have a few conflicting uses of ports on this project so I wanted mine to use a few as possible). Anyway from your information I will go with the port-per-server implementation.
I'm still not sure why specifying the clients' port helps with conflicts on the server side. Were you going to dispatch to the correct protocol based on the client's port? That's probably not a good idea, better to have e.g. a "I want to do protocol X" message upon connection if you want to support multiple protocols on same server port.
participants (2)
-
Chris Laws
-
Itamar Shtull-Trauring