Lingua

DatagramSocket.GetEndpointPairsAsync Metodo

Definizione

Overload

Nome Descrizione
GetEndpointPairsAsync(HostName, String)

Ottiene un elenco di oggetti EndpointPair basati su un nome host remoto e un nome di servizio remoto che possono essere usati per inviare datagrammi a una destinazione di rete remota.

GetEndpointPairsAsync(HostName, String, HostNameSortOptions)

Ottiene un elenco di oggetti EndpointPair in base a un nome host remoto e al nome del servizio remoto e all'ordinamento da utilizzare.

GetEndpointPairsAsync(HostName, String)

Ottiene un elenco di oggetti EndpointPair basati su un nome host remoto e un nome di servizio remoto che possono essere usati per inviare datagrammi a una destinazione di rete remota.

public:
 static IAsyncOperation<IVectorView<EndpointPair ^> ^> ^ GetEndpointPairsAsync(HostName ^ remoteHostName, Platform::String ^ remoteServiceName);
/// [Windows.Foundation.Metadata.Overload("GetEndpointPairsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IVectorView<EndpointPair>> GetEndpointPairsAsync(HostName const& remoteHostName, winrt::hstring const& remoteServiceName);
[Windows.Foundation.Metadata.Overload("GetEndpointPairsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IReadOnlyList<EndpointPair>> GetEndpointPairsAsync(HostName remoteHostName, string remoteServiceName);
function getEndpointPairsAsync(remoteHostName, remoteServiceName)
Public Shared Function GetEndpointPairsAsync (remoteHostName As HostName, remoteServiceName As String) As IAsyncOperation(Of IReadOnlyList(Of EndpointPair))

Parametri

remoteHostName
HostName

Nome host remoto o indirizzo IP.

remoteServiceName
String

Platform::String

winrt::hstring

Nome del servizio remoto o porta UDP.

Valori restituiti

Elenco di oggetti EndpointPair .

Attributi

Commenti

Il metodo GetEndpointPairsAsync ottiene un elenco di possibili oggetti EndpointPair che possono essere usati da un Oggetto DatagramSocket per inviare datagrammi a una destinazione di rete remota. L'elenco restituito viene ordinato in modo che le coppie di indirizzi più adatte per la comunicazione tra due peer si verifichino in precedenza nell'elenco.

Un oggetto DatagramSocket può usare l'elenco restituito dal metodo GetEndpointPairsAsync per provare e associare o connettersi a ogni oggetto EndpointPair fino a quando non è possibile stabilire una connessione. Un oggetto EndpointPair dall'elenco verrà usato con i metodi ConnectAsync(EndpointPair)

Vedi anche

Si applica a

GetEndpointPairsAsync(HostName, String, HostNameSortOptions)

Ottiene un elenco di oggetti EndpointPair in base a un nome host remoto e al nome del servizio remoto e all'ordinamento da utilizzare.

public:
 static IAsyncOperation<IVectorView<EndpointPair ^> ^> ^ GetEndpointPairsAsync(HostName ^ remoteHostName, Platform::String ^ remoteServiceName, HostNameSortOptions sortOptions);
/// [Windows.Foundation.Metadata.Overload("GetEndpointPairsWithSortOptionsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IVectorView<EndpointPair>> GetEndpointPairsAsync(HostName const& remoteHostName, winrt::hstring const& remoteServiceName, HostNameSortOptions const& sortOptions);
[Windows.Foundation.Metadata.Overload("GetEndpointPairsWithSortOptionsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IReadOnlyList<EndpointPair>> GetEndpointPairsAsync(HostName remoteHostName, string remoteServiceName, HostNameSortOptions sortOptions);
function getEndpointPairsAsync(remoteHostName, remoteServiceName, sortOptions)
Public Shared Function GetEndpointPairsAsync (remoteHostName As HostName, remoteServiceName As String, sortOptions As HostNameSortOptions) As IAsyncOperation(Of IReadOnlyList(Of EndpointPair))

Parametri

remoteHostName
HostName

Nome host remoto o indirizzo IP.

remoteServiceName
String

Platform::String

winrt::hstring

Nome del servizio remoto o porta UDP.

sortOptions
HostNameSortOptions

Ordinamento da utilizzare per la restituzione dell'elenco.

Valori restituiti

Elenco di oggetti EndpointPair .

Attributi

Commenti

Il metodo GetEndpointPairsAsync ottiene un elenco di possibili oggetti EndpointPair che possono essere usati da un Oggetto DatagramSocket per connettersi a una destinazione di rete remota. L'elenco restituito viene ordinato in base al parametro sortOptions .

Un oggetto DatagramSocket può usare l'elenco restituito dal metodo GetEndpointPairsAsync per provare e associare o connettersi a ogni oggetto EndpointPair fino a raggiungere una destinazione remota. Un oggetto EndpointPair dall'elenco verrà usato con il metodo ConnectAsync(EndpointPair).

Vedi anche

Si applica a