B
B or T
How do you dynamically allocate a port number (assured that it is not
already in use), and advertise it (by name or ID)?
Every book I come across seems to hard code/configure a specific port
number. This obviously won't work in general, if different applications try
to grab the same ports, or if multiple instances of the application are
running on the same machine (such as two instances of a client program
requiring callback connections).
On other platforms this is done by a "port broker". Is there a standard
port brokers in .net (or accessible to .net) for dynamically allocated port
numbers? Would system.directoryServices be the place to look?
already in use), and advertise it (by name or ID)?
Every book I come across seems to hard code/configure a specific port
number. This obviously won't work in general, if different applications try
to grab the same ports, or if multiple instances of the application are
running on the same machine (such as two instances of a client program
requiring callback connections).
On other platforms this is done by a "port broker". Is there a standard
port brokers in .net (or accessible to .net) for dynamically allocated port
numbers? Would system.directoryServices be the place to look?