Does tcplistener bind the entire local address?

I have a server application I'm playing with. I bind the address to 127.0.0.1, and that was fine until I wanted to connect from the client inside the virtual machine. So I bind it to 192 ... Well, now my test is that everything connects to 127 ... cannot connect. I know that I can use Any, but I do not want to connect to the external Internet (I know that I can use firewalls, but I do not want ATM).

Is there a way to specify any local address to work with 192.xxx and 127.0.0.3 files?

+4
source share
1 answer

When specifying a local address, use IPAddress.Any instead of an explicit address. See also the previously asked question: TcpListener: how to listen on a specific port on all interfaces?

+6
source

All Articles