> ## 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

> 可為端點擷取的統計資料類型。

可為端點擷取的統計資料類型。

## 語法

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

## 常數

| 常數 | 描述 |
| - | - |
| CurrentlyQueuedSendMessages | 目前已由 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 排入佇列，但尚未從本機端點傳輸至指定目標端點的訊息數目。  為了提高效率，透過透明雲端轉送伺服器一次傳送至多個目標端點時，PartyLocalEndpoint::SendMessage() 只會將單一訊息排入佇列。如果在查詢此統計資料時，將其中兩個或更多端點指定給 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)，訊息只會計算一次，而不會依目標端點倍增。 |
| CurrentlyQueuedSendMessageBytes | 目前已由 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 排入佇列，但尚未從本機端點傳輸至指定目標端點之訊息的資料位元組數。  為了提高效率，透過透明雲端轉送伺服器一次傳送至多個目標端點時，PartyLocalEndpoint::SendMessage() 只會將單一訊息排入佇列。如果在查詢此統計資料時，將其中兩個或更多端點指定給 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)，訊息位元組只會計算一次，而不會依目標端點倍增。 |
| CurrentlyActiveSendMessages | 從本機端點傳送至指定目標端點、目前正在傳輸或仍有更多本機狀態變更待處理之 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 訊息的數目。  一旦訊息的第一個位元組被放入正在傳輸的封包中，該訊息就會被視為「作用中」。它會保持作用中，直到傳輸完成，且其本機 [PartyDataBuffersReturnedStateChange](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/structs/partydatabuffersreturnedstatechange.md) (如果適用) 已傳回給 [PartyManager::FinishProcessingStateChanges()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_finishprocessingstatechanges.md) 為止。   為了提高效率，透過透明雲端轉送伺服器一次傳送至多個目標端點時，每次 PartyLocalEndpoint::SendMessage() 只會追蹤單一訊息。如果在查詢此統計資料時，將其中兩個或更多端點指定給 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)，訊息只會計算一次，而不會依目標端點倍增。 |
| CurrentlyActiveSendMessageBytes | 從本機端點傳送至指定目標端點、目前正在傳輸或仍有更多本機狀態變更待處理之 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 訊息的資料位元組數。  一旦訊息的第一個位元組被放入正在傳輸的封包中，該訊息就會被視為「作用中」。它會保持作用中，直到傳輸完成，且其本機 [PartyDataBuffersReturnedStateChange](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/structs/partydatabuffersreturnedstatechange.md) (如果適用) 已傳回給 [PartyManager::FinishProcessingStateChanges()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_finishprocessingstatechanges.md) 為止。   為了提高效率，透過透明雲端轉送伺服器一次傳送至多個目標端點時，每次 PartyLocalEndpoint::SendMessage() 只會追蹤單一訊息。如果在查詢此統計資料時，將其中兩個或更多端點指定給 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)，訊息位元組只會計算一次，而不會依目標端點倍增。 |
| TimedOutSendMessages | 從本機端點傳送至指定目標端點、曾因超過其傳送佇列逾時而在未傳輸的情況下被捨棄之 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 訊息的總數。  訊息的傳送佇列逾時是在呼叫 PartyLocalEndpoint::SendMessage() 時使用 [PartySendMessageQueuingConfiguration::timeoutInMillseconds](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/structs/partysendmessagequeuingconfiguration.md) 指定。   為了提高效率，透過透明雲端轉送伺服器一次傳送至多個目標端點時，PartyLocalEndpoint::SendMessage() 只會將單一訊息排入佇列。如果在查詢此統計資料時，將其中兩個或更多端點指定給 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)，訊息只會計算一次，而不會依目標端點倍增。     提供零個項目的陣列給 PartyLocalEndpoint::GetEndpointStatistics() 以查詢所有目標端點的此統計資料時，請注意只會包含目前存在的端點。如果有逾時訊息的端點在兩次查詢之間被終結，此計數可能會被視為「倒退」。 |
| TimedOutSendMessageBytes | 從本機端點傳送至指定目標端點、曾因超過其傳送佇列逾時而在未傳輸的情況下被捨棄之 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 訊息的資料總位元組數。  訊息的傳送佇列逾時是在呼叫 PartyLocalEndpoint::SendMessage() 時使用 [PartySendMessageQueuingConfiguration::timeoutInMillseconds](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/structs/partysendmessagequeuingconfiguration.md) 指定。   為了提高效率，透過透明雲端轉送伺服器一次傳送至多個目標端點時，PartyLocalEndpoint::SendMessage() 只會將單一訊息排入佇列。如果在查詢此統計資料時，將其中兩個或更多端點指定給 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)，訊息位元組只會計算一次，而不會依目標端點倍增。     提供零個項目的陣列給 PartyLocalEndpoint::GetEndpointStatistics() 以查詢所有目標端點的此統計資料時，請注意只會包含目前存在的端點。如果有逾時訊息的端點在兩次查詢之間被終結，此計數可能會被視為「倒退」。 |
| CanceledSendMessages | 從本機端點傳送至指定目標端點、曾被取消之 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 訊息的總數。  訊息會在傳輸前由應用程式以相符的篩選運算式呼叫 PartyLocalEndpoint::CancelMessages() 取消。   為了提高效率，透過 PartyNetwork 透明雲端轉送伺服器一次傳送至多個目標端點時，PartyLocalEndpoint::SendMessage() 只會將單一訊息排入佇列。如果在查詢此統計資料時，將其中兩個或更多端點指定給 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)，訊息只會計算一次，而不會依目標端點倍增。     提供零個項目的陣列給 PartyLocalEndpoint::GetEndpointStatistics() 以查詢所有目標端點的此統計資料時，請注意只會包含目前存在的端點。如果有已取消訊息的端點在兩次查詢之間被終結，此計數可能會被視為「倒退」。 |
| CanceledSendMessageBytes | 從本機端點傳送至指定目標端點、曾被取消之 [PartyLocalEndpoint::SendMessage()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md) 訊息的資料總位元組數。  訊息會在傳輸前由應用程式以相符的篩選運算式呼叫 PartyLocalEndpoint::CancelMessages() 取消。   為了提高效率，透過 PartyNetwork 透明雲端轉送伺服器一次傳送至多個目標端點時，PartyLocalEndpoint::SendMessage() 只會將單一訊息排入佇列。如果在查詢此統計資料時，將其中兩個或更多端點指定給 [PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)，訊息位元組只會計算一次，而不會依目標端點倍增。     提供零個項目的陣列給 PartyLocalEndpoint::GetEndpointStatistics() 以查詢所有目標端點的此統計資料時，請注意只會包含目前存在的端點。如果有已取消訊息的端點在兩次查詢之間被終結，此計數可能會被視為「倒退」。 |
| AverageDeviceRoundTripLatencyInMilliseconds | 與端點之擁有裝置之間目前的移動平均來回延遲 (「Ping 時間」)，以毫秒為單位。  此延遲代表此本機裝置目前傳送訊息並從目標端點的裝置接收回應所需時間的移動平均。   此統計資料一次只能針對恰好一個目標端點查詢。如果提供多個目標，或提供零個項目的陣列嘗試查詢所有目前的端點，[PartyLocalEndpoint::GetEndpointStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md) 方法將會失敗。     您也可以使用 [PartyNetwork::GetNetworkStatistics()](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getnetworkstatistics.md) 擷取 [PartyNetworkStatistic::AverageRelayServerRoundTripLatencyInMilliseconds](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/enums/partynetworkstatistic.md) 統計資料，以判斷本機裝置與網路透明雲端轉送伺服器之間的平均來回延遲。 |

## 需求

**標頭：** Party.h

## 另請參閱

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


## Related topics

- [PartyLocalEndpoint::GetEndpointStatistics](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)
- [PartyNetworkStatistic](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/enums/partynetworkstatistic.md)
- [PartyDirectPeerConnectivityOptions](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/reference/enums/partydirectpeerconnectivityoptions.md)
- [PlayFab Party 版本資訊](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/release-notes.md)
- [使用直接對等連線](https://docs.xbox.com/zh-TW/services/playfab/multiplayer/networking/concepts-direct-peer-connectivity.md)
