Redigeeri

Jagamisviis:


IPGlobalProperties.BeginGetUnicastAddresses(AsyncCallback, Object) Method

Definition

Begins an asynchronous request to retrieve the stable unicast IP address table on the local computer.

public:
 virtual IAsyncResult ^ BeginGetUnicastAddresses(AsyncCallback ^ callback, System::Object ^ state);
public virtual IAsyncResult BeginGetUnicastAddresses (AsyncCallback? callback, object? state);
public virtual IAsyncResult BeginGetUnicastAddresses (AsyncCallback callback, object state);
abstract member BeginGetUnicastAddresses : AsyncCallback * obj -> IAsyncResult
override this.BeginGetUnicastAddresses : AsyncCallback * obj -> IAsyncResult
Public Overridable Function BeginGetUnicastAddresses (callback As AsyncCallback, state As Object) As IAsyncResult

Parameters

callback
AsyncCallback

The AsyncCallback delegate.

state
Object

An object that contains state information for this request.

Returns

An IAsyncResult that references the asynchronous request.

Exceptions

This method is not implemented on the platform. This method uses the native NotifyStableUnicastIpAddressTable function that is supported on Windows Vista and later.

The call to the native NotifyStableUnicastIpAddressTable function failed.

Remarks

In order to support outbound connections or to accept incoming connections on a Teredo interface, applications need to ensure that the Teredo interface is up and ready for use. This is because Teredo can go into a dormant state when not used for some period of time.

The BeginGetUnicastAddresses method allows an application to asynchronously retrieve the list of stable unicast IP addresses. The IPAddress.IsIPv6Teredo property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.

The BeginGetUnicastAddresses method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the System.Net.NetworkInformation.NetworkInterface objects on a local computer and querying the associated IP addresses.

Applies to

See also