Editar

Compartir a través de


PartyOption

Additional options that can be set to fine-tune Party library functionality.

Syntax

enum class PartyOption  : uint32_t  
{  
    LocalUdpSocketBindAddress = 0,  
    LocalDeviceDirectPeerConnectivityOptionsMask = 1,  
    TextChatFilterLevel = 2,  
    LocalDeviceMaxDirectPeerConnections = 3,  
    RegionUpdateConfiguration = 4,  
    RegionQualityMeasurementConfiguration = 5,  
}  

Constants

Constant Description
LocalUdpSocketBindAddress An option used to configure how the Party library binds to a UDP socket.

To override this option, call PartyManager::SetOption passing null for the object parameter, this value for the option parameter, and an optional pointer to a PartyLocalUdpSocketBindAddressConfiguration structure for the value. If a null PartyLocalUdpSocketBindAddressConfiguration pointer is provided, the default configuration is restored.

To query this option, call PartyManager::GetOption passing null for the object parameter, this value for the option parameter, and a pointer to an output PartyLocalUdpSocketBindAddressConfiguration structure for the value.

It's safe and recommended to override or query for this option prior to initializing the Party library. Overriding the local UDP socket bind address configuration will take effect the next time the Party library is initialized. It doesn't modify any Party library socket binding that has already been initialized. Similarly, querying retrieves the configuration that will be used with the next Party library initialization, not the value actively in use if already initialized.
LocalDeviceDirectPeerConnectivityOptionsMask An option for constraining the permitted direct peer connectivity between the local device and other devices in networks that allow attempting such connections.

When successfully authenticating an initial local user into a network with a PartyNetworkConfiguration::directPeerConnectivityOptions field set to a value other than PartyDirectPeerConnectivityOptions::None, or when a remote device authenticates into such a network, direct peer connectivity between this local device and the remote device(s) in the network may be attempted. The flags configured by this option can be used to further constrain the specific types of remote devices that are permitted to involve the local device in these attempts. All flags are evaluated using a bitwise AND operation. That is, a particular flag is actually only in effect for a given network's pair of devices if it's enabled in three places: the network's PartyNetworkConfiguration structure, and both devices' respective local mask options. Even if the Party network permits direct peer connectivity of the relevant form, either device can unilaterally opt out of the IP address disclosure and direct connection attempts between them by not enabling the flag when overriding this option.

Direct peer connectivity is supported for the Windows, Microsoft Game Core, PlayStation®, Switch, Linux, and macOS versions of the library. On those platforms, the default value for the local device mask when not yet set is PartyDirectPeerConnectivityOptions::AnyPlatformType | PartyDirectPeerConnectivityOptions::AnyEntityLoginProvider | PartyDirectPeerConnectivityOptions::OnlyServers. This means that such devices don't restrict any direct peer connectivity permitted by a network's PartyNetworkConfiguration until explicitly overridden to be less permissive. For all other versions of the library, the default value for the local device mask is PartyDirectPeerConnectivityOptions::None and cannot be changed; attempting to change it via PartyManager::SetOption will fail. This means that such devices will never attempt direct peer connectivity.

To override this option, call PartyManager::SetOption passing null for the object parameter, this value for the option parameter, and an optional pointer to a PartyDirectPeerConnectivityOptions variable containing all desired option flags. If a null PartyDirectPeerConnectivityOptions pointer is provided, the default options are restored.

To query this option, call PartyManager::GetOption passing null for the object parameter, this value for the option parameter, and a pointer to a PartyDirectPeerConnectivityOptions variable into which the currently configured option flags should be written.

It's recommended to override or query this option when not connected to any networks. The configured value takes effect the next time this device authenticates an initial user into a new network. It doesn't alter the settings already being used to participate in any existing networks. Similarly, querying retrieves the currently configured value that will be used with future networks, and not the value(s) used with existing networks.

It's also safe to override or query for this option prior to initializing the Party library.
TextChatFilterLevel An option for fine-tuning the level at which chat text will be filtered.

This feature only applies to incoming chat text detected as English. The filter level cannot be changed for other languages.

The filter level will apply to incoming chat text for all local chat controls on the client. Filtering must be enabled with PartyLocalChatControl::SetTextChatOptions for at least one local chat control for this to have an effect on the chat text.

To override this option, call PartyManager::SetOption passing null for the object parameter, this value for the option parameter, and an optional pointer to a PartyTextChatFilterLevel variable containing the desired filter level. If a null PartyTextChatFilterLevel pointer is provided, the default level is restored.

To query this option, call PartyManager::GetOption passing null for the object parameter, this value for the option parameter, and a pointer to a PartyTextChatFilterLevel variable into which the currently configured filter level should be written.

It's safe to override or query for this option at any time, including prior to initializing the Party library. Setting a new value will take effect immediately.
LocalDeviceMaxDirectPeerConnections An option for configuring the max number of direct peer connections this device attempts to establish to other devices.

When successfully authenticating an initial local user into a network with a PartyNetworkConfiguration::directPeerConnectivityOptions field set to a value other than PartyDirectPeerConnectivityOptions::None, devices may attempt direct peer connectivity to each other. To avoid excessive resource consumption, the Party library will internally prevent any given device from attempting to establish more direct peer connections than this maximum across all networks in which it's currently participating. This doesn't affect the device's ability to participate in large or multiple networks with additional remote devices, it simply defines the number of opportunities for endpoint messages and chat data between the devices to be transmitted using those direct connections instead of via transparent cloud relay servers.

You can determine whether the local device actually established a direct peer-to-peer connection to a specific remote device in a network by calling PartyNetwork::GetDeviceConnectionType().

The default value for this option is c_maxDirectPeerConnectionsPerDevice, though when using the default settings, the value only applies when authenticating a local user with a PlayFab entity type of title_player_account. When instead authenticating a local user with a PlayFab entity type of game_server with the default option configuration, there is no maximum number of direct peer connections.

To override this value regardless of PlayFab entity type, call PartyManager::SetOption passing null for the object parameter, this value for the option parameter, and an optional pointer to a uint32_t variable for the value. If a null uint32_t pointer is provided, the default value and behavior is restored.

To query this option, call PartyManager::GetOption passing null for the object parameter, this value for the option parameter, and a pointer to a uint32_t variable into which the currently configured value should be written.

It's safe to override or query for this option at any time, including prior to initializing the Party library. Setting a new value will take effect for all networks joined after the value is changed.
RegionUpdateConfiguration An option used to configure when the Party library performs automatic region discovery and connection quality measurement updates.

To override this option, call PartyManager::SetOption passing null for the object parameter, this value for the option parameter, and an optional pointer to a PartyRegionUpdateConfiguration structure for the value. If a null PartyRegionUpdateConfiguration pointer is provided, the default configuration is restored.

To query this option, call PartyManager::GetOption passing null for the object parameter, this value for the option parameter, and a pointer to an output PartyRegionUpdateConfiguration structure for the value.

It's safe to override or query for this option at any time, including prior to initializing the Party library. Overriding the region update configuration will take effect immediately.
RegionQualityMeasurementConfiguration An option used for fine-grained control over Party library region quality measurement behavior.

To override this option, call PartyManager::SetOption passing null for the object parameter, this value for the option parameter, and an optional pointer to a PartyRegionQualityMeasurementConfiguration structure for the value. If a null PartyRegionQualityMeasurementConfiguration pointer is provided, the default configuration is restored.

To query this option, call PartyManager::GetOption passing null for the object parameter, this value for the option parameter, and a pointer to an output PartyRegionQualityMeasurementConfiguration structure for the value.

It's safe to override or query for this option at any time, including prior to initializing the Party library. Overriding the region quality measurement configuration will take effect with the next region update.

Requirements

Header: Party.h

See also

Party members
PartyManager::SetOption
PartyManager::GetOption
PartyLocalUdpSocketBindAddressConfiguration
PartyNetworkConfiguration
PartyDirectPeerConnectivityOptions
PartyRegionUpdateConfiguration
PartyRegionQualityMeasurementConfiguration