Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EndpointPair class

Provides data for the local endpoint and remote endpoint for a network connection used by network apps.

Syntax


Public NotInheritable Class EndpointPair

Members

The EndpointPair class has these types of members:

Constructors

The EndpointPair class has these constructors.

ConstructorDescription
EndpointPair Creates a new EndpointPair object.

 

Methods

The EndpointPair class inherits methods from the Object class (C#/VB/C++).

Properties

The EndpointPair class has these properties.

PropertyAccess typeDescription

LocalHostName

Read/write

Get or set the local hostname for the EndpointPair object.

LocalServiceName

Read/write

Get or set the local service name for the EndpointPair object.

RemoteHostName

Read/write

Get or set the remote hostname for the EndpointPair object.

RemoteServiceName

Read/write

Get or set the remote service name for the EndpointPair object.

 

Remarks

The EndpointPair class is used to initialize and provide data for an endpoint pair used in network apps. The EndpointPair object provides data for the local endpoint and remote endpoint for a network connection. The EndpointPair object is used by many classes in other related namespaces for network apps. These include the following:

An endpoint consists of two elements:

  • The hostname or IP address.
  • The service name or the TCP or UDP port number.

An endpoint pair consists of two elements:

  • The local endpoint.
  • The remote endpoint.

If the local hostname is null for the local endpoint before a network connection is established by a client app, then the system will automatically provide the local IP address for the app to use.

If the local service name is an empty string for the local endpoint before a network connection is established by a client app, then the system will automatically provide a TCP or UDP port for the app to use.

The WiFiDirectDevice class can be used to locate other devices that have a Wi-Fi Direct (WFD) capable device. The WiFiDirectDevice.GetDeviceSelector method gets the device identifier for a nearby WFD device. Once you have a reference to a nearby WFD device, you can call the WiFiDirectDevice.GetConnectionEndpointPairs method to get an EndpointPair object.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Networking
Windows::Networking [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8

Namespace

Windows.Networking
Windows::Networking [C++]

Metadata

Windows.winmd

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

See also

DatagramSocket
HostName
NetworkInformation
StreamSocket
Windows.Networking
Windows.Networking.Sockets
Object
WiFiDirectDevice.GetConnectionEndpointPairs

 

 

Show: