[Twisted-Python] multiple connectTCP bindaddress problem

Chris Laws claws at tpg.com.au
Mon Nov 8 19:22:04 EST 2004

I probably have not explained myself very well. 
I'm only using a single protocol.
The server side of my application is all fine, no problems with conflicts.

The server side uses a single port. There are approx 30 machines
each of which runs a separate instance of the server side application. 
They all bind the same port number on their local machine as a listen 

My client side application will attempt to maintain a connection with all 
server side applications. The design allows for multiple client side applications
to run (though not on the same machine).

It's the client side I was concerned with. I agree that there will never be
conflicts between client side applications.

I'm working on a large project, by that I mean many application developed by
disparate teams. There are many different applications performing different functions.
My application is a very small part of the project and is used to monitor and 
display the process status of applications running on remote machines. It provides
a custom way of starting/atopping allications in an ordered manner etc.
Many of the project applications run on the same machine which my client 
application will be deployed on. It is these other applications which do not 
have well defined ports. Their ports are determined depending on who is 
logged in (port numbers are determined via some env setting). 
I wanted to make sure I used a specific port so that I could notify others that 
port "x" was now a well known port used by my application. To ensure I used a 
specific port I need to use the 'bindaddress' argument in the connectTCP call. 
I originally thought it would be nice to establish all the client application's 
outgoing connections as originating from the same IP:Port.

client                                    servers

                              / ---------

However from the post's I've read it seems that Windows does not support this 
functionality reliably. 

So, instead of using one port on the client side application to connect to all server ports,
I will now need a unique port (on the client side) for each server that the client wishes
to connect with.

Hopefully design is clearer now and will help you help me. 
Is there a clearly better way to set up the client/sever connections?

More information about the Twisted-Python mailing list