> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PartyEndpointStatistic

> 可为终结点检索的统计信息类型。

可为终结点检索的统计信息类型。

## Syntax

```cpp theme={null}
enum class PartyEndpointStatistic    
{  
    CurrentlyQueuedSendMessages = 0,  
    CurrentlyQueuedSendMessageBytes = 1,  
    CurrentlyActiveSendMessages = 2,  
    CurrentlyActiveSendMessageBytes = 3,  
    TimedOutSendMessages = 4,  
    TimedOutSendMessageBytes = 5,  
    CanceledSendMessages = 6,  
    CanceledSendMessageBytes = 7,  
    AverageDeviceRoundTripLatencyInMilliseconds = 8,  
}  
```

## Constants

| Constant | Description |
| - | - |
| CurrentlyQueuedSendMessages | 当前由 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 加入队列但尚未从本地终结点传输到指定目标终结点的消息数量。  出于效率考虑，当通过透明云中继服务器一次向多个目标终结点发送时，PartyLocalEndpoint::SendMessage() 仅将单个消息加入队列。如果查询此统计信息时向 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 指定了其中两个或更多终结点，则该消息只会被计数一次，而不会按每个目标终结点分别计数。 |
| CurrentlyQueuedSendMessageBytes | 当前由 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 加入队列但尚未从本地终结点传输到指定目标终结点的消息中数据的字节数。  出于效率考虑，当通过透明云中继服务器一次向多个目标终结点发送时，PartyLocalEndpoint::SendMessage() 仅将单个消息加入队列。如果查询此统计信息时向 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 指定了其中两个或更多终结点，则该消息的字节数只会被计数一次，而不会按每个目标终结点分别计数。 |
| CurrentlyActiveSendMessages | 从本地终结点发送到指定目标终结点、当前正在传输或仍有更多本地状态更改待处理的 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 消息数量。  一旦消息的第一个字节被放入正在传输的数据包中，该消息就被视为"活动"。它保持活动状态，直到传输完成并且其本地 [PartyDataBuffersReturnedStateChange](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/structs/partydatabuffersreturnedstatechange.md)（如适用）已返回给 [PartyManager::FinishProcessingStateChanges()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_finishprocessingstatechanges.md)。  出于效率考虑，当通过透明云中继服务器一次向多个目标终结点发送时，每次 PartyLocalEndpoint::SendMessage() 仅跟踪单个消息。如果查询此统计信息时向 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 指定了其中两个或更多终结点，则该消息只会被计数一次，而不会按每个目标终结点分别计数。 |
| CurrentlyActiveSendMessageBytes | 从本地终结点发送到指定目标终结点、当前正在传输或仍有更多本地状态更改待处理的 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 消息中数据的字节数。  一旦消息的第一个字节被放入正在传输的数据包中，该消息就被视为"活动"。它保持活动状态，直到传输完成并且其本地 [PartyDataBuffersReturnedStateChange](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/structs/partydatabuffersreturnedstatechange.md)（如适用）已返回给 [PartyManager::FinishProcessingStateChanges()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_finishprocessingstatechanges.md)。  出于效率考虑，当通过透明云中继服务器一次向多个目标终结点发送时，每次 PartyLocalEndpoint::SendMessage() 仅跟踪单个消息。如果查询此统计信息时向 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 指定了其中两个或更多终结点，则该消息的字节数只会被计数一次，而不会按每个目标终结点分别计数。 |
| TimedOutSendMessages | 从本地终结点发送到指定目标终结点、因超过其发送队列超时时间而在未传输的情况下曾被丢弃的 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 消息总数。  调用 PartyLocalEndpoint::SendMessage() 时，使用 [PartySendMessageQueuingConfiguration::timeoutInMillseconds](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/structs/partysendmessagequeuingconfiguration.md) 指定消息的发送队列超时时间。  出于效率考虑，当通过透明云中继服务器一次向多个目标终结点发送时，PartyLocalEndpoint::SendMessage() 仅将单个消息加入队列。如果查询此统计信息时向 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 指定了其中两个或更多终结点，则该消息只会被计数一次，而不会按每个目标终结点分别计数。     通过向 PartyLocalEndpoint::GetEndpointStatistics() 提供零条目数组来查询所有目标终结点的此统计信息时，请注意仅包含当前存在的终结点。如果具有超时消息的终结点在查询之间被销毁，此计数可能被感知为"倒退"。 |
| TimedOutSendMessageBytes | 从本地终结点发送到指定目标终结点、因超过其发送队列超时时间而在未传输的情况下曾被丢弃的 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 消息中数据的总字节数。  调用 PartyLocalEndpoint::SendMessage() 时，使用 [PartySendMessageQueuingConfiguration::timeoutInMillseconds](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/structs/partysendmessagequeuingconfiguration.md) 指定消息的发送队列超时时间。  出于效率考虑，当通过透明云中继服务器一次向多个目标终结点发送时，PartyLocalEndpoint::SendMessage() 仅将单个消息加入队列。如果查询此统计信息时向 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 指定了其中两个或更多终结点，则该消息的字节数只会被计数一次，而不会按每个目标终结点分别计数。     通过向 PartyLocalEndpoint::GetEndpointStatistics() 提供零条目数组来查询所有目标终结点的此统计信息时，请注意仅包含当前存在的终结点。如果具有超时消息的终结点在查询之间被销毁，此计数可能被感知为"倒退"。 |
| CanceledSendMessages | 从本地终结点发送到指定目标终结点、曾被取消的 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 消息总数。  应用程序在传输消息之前通过调用带有匹配筛选表达式的 PartyLocalEndpoint::CancelMessages() 取消消息。  出于效率考虑，当通过 PartyNetwork 透明云中继服务器一次向多个目标终结点发送时，PartyLocalEndpoint::SendMessage() 仅将单个消息加入队列。如果查询此统计信息时向 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 指定了其中两个或更多终结点，则该消息只会被计数一次，而不会按每个目标终结点分别计数。     通过向 PartyLocalEndpoint::GetEndpointStatistics() 提供零条目数组来查询所有目标终结点的此统计信息时，请注意仅包含当前存在的终结点。如果具有已取消消息的终结点在查询之间被销毁，此计数可能被感知为"倒退"。 |
| CanceledSendMessageBytes | 从本地终结点发送到指定目标终结点、曾被取消的 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 消息中数据的总字节数。  应用程序在传输消息之前通过调用带有匹配筛选表达式的 PartyLocalEndpoint::CancelMessages() 取消消息。  出于效率考虑，当通过 PartyNetwork 透明云中继服务器一次向多个目标终结点发送时，PartyLocalEndpoint::SendMessage() 仅将单个消息加入队列。如果查询此统计信息时向 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 指定了其中两个或更多终结点，则该消息的字节数只会被计数一次，而不会按每个目标终结点分别计数。     通过向 PartyLocalEndpoint::GetEndpointStatistics() 提供零条目数组来查询所有目标终结点的此统计信息时，请注意仅包含当前存在的终结点。如果具有已取消消息的终结点在查询之间被销毁，此计数可能被感知为"倒退"。 |
| AverageDeviceRoundTripLatencyInMilliseconds | 到终结点所属设备的当前往返延迟移动平均值（"ping 时间"），以毫秒为单位。  此延迟表示本地设备当前发送消息并从目标终结点的设备接收响应所需时间的移动平均值。  此统计信息一次只能针对一个目标终结点进行查询。如果提供了多个目标，或者提供了零条目数组以尝试查询所有当前终结点，[PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 方法将失败。     也可以通过使用 [PartyNetwork::GetNetworkStatistics()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getnetworkstatistics.md) 检索 [PartyNetworkStatistic::AverageRelayServerRoundTripLatencyInMilliseconds](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/enums/partynetworkstatistic.md) 统计信息，来确定本地设备到网络的透明云中继服务器的平均往返延迟。 |

## Requirements

**Header:** Party.h

## See also

[Party members](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/party_members.md)\
[PartyNetworkStatistic](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/enums/partynetworkstatistic.md)\
[PartySendMessageQueuingConfiguration](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/structs/partysendmessagequeuingconfiguration.md)\
[PartyLocalEndpoint::SendMessage](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md)\
[PartyLocalEndpoint::GetEndpointStatistics](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)\
[PartyNetwork::GetNetworkStatistics](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getnetworkstatistics.md)


## Related topics

- [PartyLocalEndpoint::GetEndpointStatistics](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)
- [PartyNetworkStatistic](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/enums/partynetworkstatistic.md)
- [PartyDirectPeerConnectivityOptions](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/enums/partydirectpeerconnectivityoptions.md)
- [PlayFab Party 发行说明](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/release-notes.md)
- [使用直接点对点连接](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/concepts-direct-peer-connectivity.md)
