Hi gums,
I didn't misunderstand. In my first post I merely asked if dynamic port forward would solve my problem.
I now know that dynamic port forwarding is not what I want.
Like I said in my last post, I am using local port forwarding. I am creating additional port forwards as needed; however, the issue is that I cannot simply pick a port at random because it might be in use. So then I would need code that found an available port.
Since the system has a way of using the next available port (pass 0 in for the port to the TcpListener) I was suggesting that the API to the ForwardedPortLocal change so that 0 can be specified as the port and the ForwardedPortLocal class could return the port that the system selected.
I will sumbit a patch with the changes I'm talking about and see if the author agrees.
Thanks
I didn't misunderstand. In my first post I merely asked if dynamic port forward would solve my problem.
I now know that dynamic port forwarding is not what I want.
Like I said in my last post, I am using local port forwarding. I am creating additional port forwards as needed; however, the issue is that I cannot simply pick a port at random because it might be in use. So then I would need code that found an available port.
Since the system has a way of using the next available port (pass 0 in for the port to the TcpListener) I was suggesting that the API to the ForwardedPortLocal change so that 0 can be specified as the port and the ForwardedPortLocal class could return the port that the system selected.
I will sumbit a patch with the changes I'm talking about and see if the author agrees.
Thanks