IPEndPointList Collection : AddLocalAddresses Method |
Visual Basic |
---|
Public Sub AddLocalAddresses() |
The method is used to populate the IPEndPointList with all local physical network adapter addresses available for binding to.
This method does not add the non-physical addresses:
IPv4 Any: 0.0.0.0
IPv6 Any: 0:0:0:0:0:0:0:0, or :: in compact notation
IPv4 Loopback: 127.0.0.1
IPv6 Loopback: 0:0:0:0:0:0:0:1, or ::1 in compact notation
Dim localAddresses as New IPEndPointList localAddresses.AddLocalAddresses ' localAddresses now contains a list of IP interface addresses (port is 0)