Suppose that I have a license server that goes with my program.
The client installs both of them on his computers so when he tries to use a floating license, I can tell whether or not it is already in use.
The license server listens on a UDP port and the clients use it to communicate with the server and receive a TCP port number to which they should
connect in order to continue their conversation with the server.
Since the server is also installed at the clients, I cannot know which other processes run on the same computer while my server does and they might use the same UDP port. If they use the same UDP port, I'd either be blocked from using it or I'd have to share the port with the other process, losing messages since they go to the other process instead of going to my server.
How can I avoid this?
Should I use a configurable UDP port? The problem is that if I do it, the client will be able to run several license servers, each on a different port, unaware of each other while the clients will be able to use the same license on different instances of the server... I'll miss the whole point...
What should I do?
Edited by Idov, 14 September 2012 - 08:17 AM.