Share via


XboxLiveEndpointPair.FindEndpointPairByHostNamesAndPorts 方法

定义

查找与从第一个主机和端口到第二个主机和端口的流量关联的现有 XboxLiveEndpointPair 实例(如果存在)。

使用此方法可向后从传入流量向与该流量关联的 XboxLiveEndpointPair

重要

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

public:
 static XboxLiveEndpointPair ^ FindEndpointPairByHostNamesAndPorts(HostName ^ localHostName, Platform::String ^ localPort, HostName ^ remoteHostName, Platform::String ^ remotePort);
 static XboxLiveEndpointPair FindEndpointPairByHostNamesAndPorts(HostName const& localHostName, winrt::hstring const& localPort, HostName const& remoteHostName, winrt::hstring const& remotePort);
public static XboxLiveEndpointPair FindEndpointPairByHostNamesAndPorts(HostName localHostName, string localPort, HostName remoteHostName, string remotePort);
function findEndpointPairByHostNamesAndPorts(localHostName, localPort, remoteHostName, remotePort)
Public Shared Function FindEndpointPairByHostNamesAndPorts (localHostName As HostName, localPort As String, remoteHostName As HostName, remotePort As String) As XboxLiveEndpointPair

参数

localHostName
HostName

终结点对本地端的 HostName

localPort
String

Platform::String

winrt::hstring

终结点对本地端的端口号。

remoteHostName
HostName

终结点对远程端的 HostName

remotePort
String

Platform::String

winrt::hstring

终结点对远程端的端口号。

返回

对应于指定终结点的 XboxLiveEndpointPair ;如果未找到此类终结点对,则为 null 指针。

适用于