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

# PartyRegionsChangedStateChange

> Information specific to the *RegionsChanged* type of state change.

Information specific to the *RegionsChanged* type of state change.

## Syntax

```cpp theme={null}
struct PartyRegionsChangedStateChange : PartyStateChange {  
    PartyStateChangeResult result;  
    PartyError errorDetail;  
}  
```

### Members

**`result`**   [PartyStateChangeResult](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partystatechangeresult.md)

Indicates whether a background operation to query the list of supported regions and the latency to each region succeeded, or provides the reason that it failed.

When the result is [PartyStateChangeResult::Succeeded](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partystatechangeresult.md), the region list provided by [PartyManager::GetRegions()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_getregions.md) is populated with the results of the operation. On failure, the region list provided by PartyManager::GetRegions() is empty. \
\
&#x20;If the result is [PartyStateChangeResult::FailedToBindToLocalUdpSocket](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partystatechangeresult.md), the library couldn't bind to the local UDP socket specified in the [PartyOption::LocalUdpSocketBindAddress](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partyoption.md) option. The title must clean up its instance of the library, update the [PartyOption::LocalUdpSocketBindAddress](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partyoption.md) option to a valid, available bind address, and reinitialize the library.

**`errorDetail`**   PartyError

A diagnostic value providing more troubleshooting information regarding any potential error condition.

The human-readable form of this error detail can be retrieved via [PartyManager::GetErrorMessage()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage.md).

## Remarks

Retrieving the list of available regions and measuring connection quality to them occurs automatically in the background. This operation is first initiated when [PartyManager::Initialize()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_initialize.md) is called unless the [PartyOption::RegionUpdateConfiguration](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partyoption.md) option was used to configure an update mode of [PartyRegionUpdateMode::Deferred](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partyregionupdatemode.md), in which case region updates may not happen at all. Deferred region updates only occur if the application calls [PartyManager::CreateNewNetwork()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createnewnetwork.md) with a zero entry region array, or isn't connected to an existing network but calls [PartyLocalChatControl::PopulateAvailableTextToSpeechProfiles()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_populateavailabletexttospeechprofiles.md), [PartyLocalChatControl::SetTextToSpeechProfile()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_settexttospeechprofile.md), or [PartyLocalChatControl::SetTranscriptionOptions()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_settranscriptionoptions.md) with option flags that include [PartyVoiceChatTranscriptionOptions::TranscribeSelfRegardlessOfNetworkState](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partyvoicechattranscriptionoptions.md). The [PartyOption::RegionUpdateConfiguration](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partyoption.md) option can also be used to configure the interval after which the regions are refreshed. \
\
&#x20;The amount of time it takes to retrieve the list of available regions and measure connection quality to them is dependent on many environmental or dynamic factors, and whether the [PartyOption::RegionQualityMeasurementConfiguration](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partyoption.md) option was used to modify low-level measurement settings. The *totalMeasurementTimeoutInMilliseconds* field in the [PartyRegionQualityMeasurementConfiguration](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partyregionqualitymeasurementconfiguration.md) structure is used to configure the worst case maximum timeout before considering all measurements complete and generating this state change.

## Requirements

**Header:** Party.h

## See also

[Party members](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/party_members.md)\
[PartyManager::GetRegions](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_getregions.md)


## Related topics

- [PartyManager::GetRegions](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_getregions.md)
- [PartyRegionUpdateConfiguration](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partyregionupdateconfiguration.md)
- [PartyRegionQualityMeasurementConfiguration](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partyregionqualitymeasurementconfiguration.md)
- [PartyRegionUpdateMode](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partyregionupdatemode.md)
- [PlayFab Party QoS measurements](https://docs.xbox.com/services/playfab/multiplayer/networking/concepts-regions.md)
