[Twisted-Python] multiple connectTCP bindaddress problem

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 socket. 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. Ie. client servers ------ 192.168.1.2:24000 / 192.169.1.1:31000 --------- 192.168.1.3:24001 \ ------ 192.168.1.4:24002 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?

On Nov 8, 2004, at 7:22 PM, Chris Laws wrote:
Hopefully design is clearer now and will help you help me. Is there a clearly better way to set up the client/sever connections?
It is basically never the right thing to specify a client port. Barring circumstances that do not apply in this case (mostly compatibility with broken protocols), you should always use "0", or "let the OS allocate one dynamically." Basically every network client does this, and there is no reason for yours to be any different. James
participants (2)
-
Chris Laws
-
James Y Knight