XboxLiveEndpointPair.RemotePort 属性

定义

获取远程终结点的端口。

重要

此 API 并非适用于所有应用。 除非你的开发人员帐户由 Microsoft 专门预配,否则对这些 API 的调用将在运行时失败。

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

属性值

String

Platform::String

winrt::hstring

远程终结点的端口。

注解

如果 XboxLiveEndpointPairTemplate 允许动态分配的端口号,则此值将为零。 在这种情况下,你的应用必须通过其他方式确定远程端口号。

此属性返回的远程端口号仅在调用设备上有效。 若要检索远程网络标识以供其他对等方使用,请使用相应的 XboxLiveDeviceAddress 对象,并将该对象的快照发送给其他对等方。

适用于