Share via


XboxLiveEndpointPair.LocalPort Property

Definition

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.

public:
 property Platform::String ^ LocalPort { Platform::String ^ get(); };
winrt::hstring LocalPort();
public string LocalPort { get; }
var string = xboxLiveEndpointPair.localPort;
Public ReadOnly Property LocalPort As String

Property Value

String

Platform::String

winrt::hstring

The local port.

Remarks

This value will be zero if the XboxLiveEndpointPairTemplate allowed dynamically-assigned port numbers. In that case, your app will have to determine the remote port number through external means.

The local port number returned by this property is valid only on the calling device. To retrieve the local network identity for use by remote peers, use the corresponding XboxLiveDeviceAddress object, and send a snapshot of that object to the remote peer.

Applies to