PartyLocalUdpSocketBindAddressConfiguration
The configuration used by the Party library to bind to a UDP socket.
Syntax
struct PartyLocalUdpSocketBindAddressConfiguration {
PartyLocalUdpSocketBindAddressOptions options;
uint16_t port;
}
Members
options
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.
If this port value can't be bound when the Party library is initialized, PartyManager::Initialize() synchronously returns an error. The human-readable form of the error code can be retrieved via PartyManager::GetErrorMessage().
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.
The default value is 0 when PartyOption::LocalUdpSocketBindAddress hasn't been configured.
Remarks
This structure can be used together with PartyOption::LocalUdpSocketBindAddress to either override or query the Party library's current configuration via PartyManager::SetOption() or PartyManager::GetOption() respectively.
Requirements
Header: Party.h
See also
Party members
PartyOption::LocalUdpSocketBindAddress
PartyLocalUdpSocketBindAddressOptions
PartyManager::SetOption
PartyManager::GetOption