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

## Requirements

**Header:** Party.h

## See also

[Party members](/services/playfab/multiplayer/networking/reference/party_members)\
[PartyNetworkStatistic](/services/playfab/multiplayer/networking/reference/enums/partynetworkstatistic)\
[PartySendMessageQueuingConfiguration](/services/playfab/multiplayer/networking/reference/structs/partysendmessagequeuingconfiguration)\
[PartyLocalEndpoint::SendMessage](/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage)\
[PartyLocalEndpoint::GetEndpointStatistics](/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics)\
[PartyNetwork::GetNetworkStatistics](/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getnetworkstatistics)


## Related topics

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