Listening TCP/IP

Is there any reason you would need to know your ‘own’ IP address in order to start a listener?
The only thing I can think of is if your system has more than one IP address (Because it has more than one interface…) that you might want to figure out which interface you are listening on?

Some services you will do just that, listen only on a given interface. For example, maybe you want to listen on a VPN interface only, or you are on an Internet connected computer and wish to listen to the internal computers and not the external.

I’m sure there are other reasons you may want to know your own IP, but can’t think of any right now.

Using the NetworkInterface.IPAddress you can see how many IP addresses are available to bind to your socket. Jeremy nailed it on the reasoning for binding examples above.

http://documentation.xojo.com/index.php/NetworkInterface.IPAddress