I am working on a remoting application wherein the server starts, registers itself at a port available and then the client has to listen to that port. I cannot give the port number statically as it might be used already by some other process. I register the server at port 0 (port 0 means the application has to find an available port).
Now, can I get the port number that the application managed to find out? Whenever I try yo do this, I get '0' as the port number.
Looking the other way round, canÃÂ I get the port number associated with the process id of the server? If I can do this, I will be able to let the client listen to the port associated with the server.
Thanks in advance
View Complete Post