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

# PartyLocalUdpSocketBindAddressConfiguration

> The configuration used by the Party library to bind to a UDP socket.

The configuration used by the Party library to bind to a UDP socket.

## Syntax

```cpp theme={null}
struct PartyLocalUdpSocketBindAddressConfiguration {  
    PartyLocalUdpSocketBindAddressOptions options;  
    uint16_t port;  
}  
```

### Members

**`options`**   [PartyLocalUdpSocketBindAddressOptions](/services/playfab/multiplayer/networking/reference/enums/partylocaludpsocketbindaddressoptions)

Optional flags describing how to interpret this UDP socket configuration.

**`port`**   uint16\_t

The specific port number to which the local UDP socket will be bound the next time Party is initialized.

In the Microsoft Game Core version of the Party library, a port value of 0 means that the Party library selects the Game Core preferred local UDP multiplayer port unless the PartyLocalUdpSocketBindAddressOptions::ExcludeGameCorePreferredUdpMultiplayerPort option flag is specified in the *options* field. On all other versions of the Party library, a port value of 0 means the Party library lets the system dynamically select a port that's available on all local IP address interfaces. <br /><br /> If this port value can't be bound when the Party library is initialized, [PartyManager::Initialize()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_initialize) synchronously returns an error. The human-readable form of the error code can be retrieved via [PartyManager::GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).   <br /><br /> The port should be specified in native host byte order. If your application also directly uses or is porting from its own socket API calls, be aware that this natural byte ordering may therefore differ from the network byte order used by socket address port numbers.   <br /><br /> The default value is 0 when [PartyOption::LocalUdpSocketBindAddress](/services/playfab/multiplayer/networking/reference/enums/partyoption) hasn't been configured.

## Remarks

This structure can be used together with [PartyOption::LocalUdpSocketBindAddress](/services/playfab/multiplayer/networking/reference/enums/partyoption) to either override or query the Party library's current configuration via [PartyManager::SetOption()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_setoption) or [PartyManager::GetOption()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_getoption) respectively.

## Requirements

**Header:** Party.h

## See also

[Party members](/services/playfab/multiplayer/networking/reference/party_members)\
[PartyOption::LocalUdpSocketBindAddress](/services/playfab/multiplayer/networking/reference/enums/partyoption)\
[PartyLocalUdpSocketBindAddressOptions](/services/playfab/multiplayer/networking/reference/enums/partylocaludpsocketbindaddressoptions)\
[PartyManager::SetOption](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_setoption)\
[PartyManager::GetOption](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_getoption)


## Related topics

- [PartyLocalUdpSocketBindAddressOptions](/services/playfab/multiplayer/networking/reference/enums/partylocaludpsocketbindaddressoptions.md)
- [PartyOption](/services/playfab/multiplayer/networking/reference/enums/partyoption.md)
- [PlayFab Party Release Notes](/services/playfab/multiplayer/networking/release-notes.md)
- [Party C/C++ API overview](/services/playfab/multiplayer/networking/reference/party_members.md)
- [PlayFab Party port usage and firewall requirements](/services/playfab/multiplayer/networking/concepts-port-usage.md)
