Επεξεργασία

Κοινή χρήση μέσω


NetPeerTcpBinding.ListenIPAddress Property

Definition

Gets or sets the IP address used for listening by the local peer node.

public:
 property System::Net::IPAddress ^ ListenIPAddress { System::Net::IPAddress ^ get(); void set(System::Net::IPAddress ^ value); };
public System.Net.IPAddress ListenIPAddress { get; set; }
[System.ComponentModel.TypeConverter(typeof(System.ServiceModel.Configuration.PeerTransportListenAddressConverter))]
public System.Net.IPAddress ListenIPAddress { get; set; }
member this.ListenIPAddress : System.Net.IPAddress with get, set
[<System.ComponentModel.TypeConverter(typeof(System.ServiceModel.Configuration.PeerTransportListenAddressConverter))>]
member this.ListenIPAddress : System.Net.IPAddress with get, set
Public Property ListenIPAddress As IPAddress

Property Value

A String value that contains the well-formed IPv4 or IPv6 address upon which the local peer node is listening.

Attributes

Exceptions

The provided address is invalid or incorrectly formed.

Remarks

If this property is not set, or is set to null or Empty, the associated PeerNode listens on all global addresses (both IPv4 and IPv6) configured for the local machine.

If a valid unicast IP address is specified for this property, then the associated PeerNode object listens on that address. IPv4 and IPv6 wildcard addresses are not considered valid.

If a non-null IP address string is specified for this property in conjunction with PnrpPeerResolverBindingElement, then the IP address must be associated with a physical interface rather than a virtual one.

ListenIPAddress must be set for ad-hoc networks in order to register with the default peer resolver (PNRP). If this property is specified in conjunction with PnrpPeerResolverElement (the default peer resolver), then the IP address must belong to a physical network interface rather than a virtual one (such as a tunneling interface). This is because PNRP only publishes within PNRP clouds corresponding to physical interfaces. By setting this property to null, all global addresses are published in the global PNRP cloud.

Applies to