Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 2.29 KB

streamsocket_getendpointpairsasync_1796487528.md

File metadata and controls

33 lines (23 loc) · 2.29 KB
-api-id -api-type
M:Windows.Networking.Sockets.StreamSocket.GetEndpointPairsAsync(Windows.Networking.HostName,System.String)
winrt method

Windows.Networking.Sockets.StreamSocket.GetEndpointPairsAsync

-description

Gets a list of EndpointPair objects based on a remote hostname and remote service name that can be used to send TCP packets to a remote network destination.

-parameters

-param remoteHostName

The hostname of a service. The service might actually be hosted on multiple services, so that a DNS lookup returns multiple IP addresses for the various servers. This method returns one endpoint pair for each of the servers found by a DNS lookup.

-param remoteServiceName

The name or port number of a remote service. Note that different servers might support the named service on different physical ports, so not all of the returned endpoints will use the same service port number.

-returns

An asynchronous lookup operation. On successful completion, the returned list contains one EndpointPair for each remote host found, with one end point being one of the remote hosts and the other being the local host.

-remarks

This method gets a list of possible EndpointPair objects that can be used by a StreamSocket to send data to a remote network destination using TCP. The returned list is sorted so that the address pairs that are best suited for communication between two peers occur earlier in the list.

A StreamSocket can use the list returned by this method to try and bind or connect to each EndpointPair object until a connection can be made. An EndpointPair object from the list would be used with the ConnectAsync(EndpointPair) methods

-examples

-see-also

GetEndpointPairsAsync(HostName, String, HostNameSortOptions)