Share via


XboxLiveEndpointPair.FindEndpointPairBySocketAddressBytes 方法

定义

查找与两个给定套接字地址之间的流量关联的现有 XboxLiveEndpointPair 实例(如果存在),其中套接字地址作为包含 Winsock SOCKADDR_STORAGE 或相关结构的字节数组提供。

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

重要

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

public:
 static XboxLiveEndpointPair ^ FindEndpointPairBySocketAddressBytes(Platform::Array <byte> ^ localSocketAddress, Platform::Array <byte> ^ remoteSocketAddress);
 static XboxLiveEndpointPair FindEndpointPairBySocketAddressBytes(winrt::array_view <byte> const& localSocketAddress, winrt::array_view <byte> const& remoteSocketAddress);
public static XboxLiveEndpointPair FindEndpointPairBySocketAddressBytes(byte[] localSocketAddress, byte[] remoteSocketAddress);
function findEndpointPairBySocketAddressBytes(localSocketAddress, remoteSocketAddress)
Public Shared Function FindEndpointPairBySocketAddressBytes (localSocketAddress As Byte(), remoteSocketAddress As Byte()) As XboxLiveEndpointPair

参数

localSocketAddress

Byte[]

byte[]

本地套接字的地址,作为包含 Winsock SOCKADDR_STORAGE 或相关结构的字节数组,例如,调用 GetLocalSocketAddressBytes 时返回的数组。

remoteSocketAddress

Byte[]

byte[]

远程套接字的地址,作为包含 Winsock SOCKADDR_STORAGE 或相关结构的字节数组,例如,调用 GetRemoteSocketAddressBytes 时返回的数组。

返回

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

适用于