XboxLiveEndpointPair Class

Definition

An XboxLiveEndpointPair is a security and network quality relationship established between two devices for socket-based communication.

The Windows.Networking.XboxLive API enables peer-to-peer (P2P) connectivity in varied environments, leveraging IPv4, IPv6, and Microsoft's Network Address Translation (NAT) traversal technologies and services (such as Teredo) to determine and configure the best available network path between endpoints. It also establishes encryption of traffic and protection against tampering, as a measure to reduce cheating. Additionally, it authenticates users and applications through the Xbox Live ecosystem&dmash;integrating connectivity information with other Xbox Live services. This information can then be used in matchmaking, to attempt to match players with similar connectivity stats against each other.

The Windows.Networking.XboxLive API complements and extends traditional networking transports such as TCP and UDP, and the available sockets APIs, WinSock and Windows.Networking.Sockets. You create an XboxLiveEndpointPair using this API, and then use your preferred transport API for actual data transmission. The XboxLiveEndpointPair concept itself is related to Windows.Networking.EndpointPair in that it can be interpreted as a set of local and remote IP addresses and ports; but with an XboxLiveEndpointPair, those properties are read-only (because the system negotiates them) and have an associated validity lifetime (because an XboxLiveEndpointPair represents an active security relationship that can be terminated for various reasons).

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

public ref class XboxLiveEndpointPair sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Networking.XboxLive.XboxLiveSecureSocketsContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class XboxLiveEndpointPair final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Networking.XboxLive.XboxLiveSecureSocketsContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class XboxLiveEndpointPair
Public NotInheritable Class XboxLiveEndpointPair
Inheritance
Object Platform::Object IInspectable XboxLiveEndpointPair
Attributes

Windows requirements

Device family
Xbox One System Apps Extensions for the UWP (introduced in 10.0.0.1)
Xbox Live Extension SDK (introduced in 10.0.10240.0)
Xbox One Extensions for the UWP (introduced in 10.0.10240.0)
Windows Desktop Extension SDK (introduced in 10.0.16299.0)
API contract
Windows.Networking.XboxLive.XboxLiveSecureSocketsContract (introduced in v1.0)

Remarks

You don't create instances of this class using a constructor. Instead, you do so using one of the CreateEndpointPairAsync or CreateEndpointPairForPorts methods in the XboxLiveEndpointPairTemplate class, in order to create an endpoint pair that follows a particular communication template.

Properties

LocalHostName

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

LocalPort

Gets the port for the local endpoint.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

RemoteDeviceAddress

Gets the XboxLiveDeviceAddress for the remote endpoint.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

RemoteHostName

Gets a HostName for the remote endpoint.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

RemotePort

Gets the port for the remote endpoint.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

State

Gets a value representing the state of this XboxLiveEndpointPair.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

Template

Gets the XboxLiveEndpointPairTemplate used to instantiate this endpoint pair.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

Methods

DeleteAsync()

Begins gracefully terminating the XboxLiveEndpointPair security relationship between the two endpoints. A best-effort attempt to notify the remote device is performed, though there's no guarantee that this notification will be received if the remote device is no longer available or reachable. The remote device might instead time out the XboxLiveEndpointPair. The action will complete successfully regardless of the remote device or the prior status of the XboxLiveEndpointPair.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

FindEndpointPairByHostNamesAndPorts(HostName, String, HostName, String)

Finds an existing XboxLiveEndpointPair instance, if one exists, associated with traffic from a first host and port to a second host and port.

Use this method to work backwards from incoming traffic to the XboxLiveEndpointPair that's associated with that traffic.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

FindEndpointPairBySocketAddressBytes(Byte[], Byte[])

Finds an existing XboxLiveEndpointPair instance, if one exists, associated with traffic between two given socket addresses, where the socket addresses are provided as arrays of Byte containing Winsock SOCKADDR_STORAGE or related structures.

Use this method to work backwards from incoming traffic to the XboxLiveEndpointPair associated with that traffic.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

GetLocalSocketAddressBytes(Byte[])

Gets the local endpoint's socket address information as an array of Byte. This method fills the specified byte buffer with the SOCKADDR_STORAGE address of the local device for use in subsequent Winsock operations leveraging the Xbox Live Multiplayer Networking API.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

GetRemoteSocketAddressBytes(Byte[])

Gets the remote endpoint's socket address information, as an array of Byte. This method fills the specified byte buffer with the SOCKADDR_STORAGE address of the remote device for use in subsequent Winsock operations leveraging the Xbox Live Multiplayer Networking API.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

Events

StateChanged

Event raised when the state of the XboxLiveEndpointPair changes.

Important

This API is not available to all apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

Applies to