#include <dwc.h>
int DWC_SetMatchingOption( DWCMatchOptType opttype,
const void* optval,
int optlen );
This function configures the matchmaking options features. Create the data necessary for each of the options specified with opttype
, and specify that pointer in optval
.
To configure the matchmaking options, the DWC_InitFriendsMatch
function must be called and the FriendsMatch Library must be started. The configured matchmaking options remain valid until the DWC_ShutdownFriendsMatch
function is called to shut down the FriendsMatch Library.
The options are as follows:
opttype | The optval type. |
Description |
---|---|---|
DWC_MATCH_OPTION_MIN_COMPLETE | The DWCMatchOptMinComplete structure. | For peer matchmaking, allows matchmaking for fewer than the number of people specified with the functions DWC_ConnectToAnybodyAsync and DWC_ConnectToFriendsAsync even when matchmaking does not complete after a fixed amount of time. The DWC_GetMOMinCompState function can be used to determine whether matchmaking is still within the specified amount of time. |
DWC_MATCH_OPTION_SC_CONNECT_BLOCK | BOOL | On the server DS in server-client matchmaking, does not accept any other connections once a single client DS has successfully connected. To start accepting connections again, call the DWC_ClearMOSCConnectBlock function. Use the DWC_GetMOSCConnectBlockState function to determine whether or not connections are blocked. The DWC_ERROR_MO_SC_CONNECT_BLOCK error is generated for the client DS that is blocking connection requests.optval indicates whether options are enabled (TRUE) or disabled (FALSE). |
opttype |
The type of matchmaking option. This is defined with DWC_MATCH_OPTION_* . |
optval |
The pointer to the values to be configured as matchmaking options. Pass a pointer to the type corresponding to opttype . The contents are saved inside the library. |
optlen |
The size of the value expressed in optval . Be sure to specify sizeof(optval) . |
DWC_SET_MATCH_OPT_RESULT_SUCCESS |
The matchmaking options were successfully configured. |
DWC_SET_MATCH_OPT_RESULT_E_BAD_STATE |
The FriendsMatch Library is not running. |
DWC_SET_MATCH_OPT_RESULT_E_INVALID |
Invalid options have been specified in opttype . |
DWC_SET_MATCH_OPT_RESULT_E_PARAM |
An invalid parameter was specified for the optval value. |
DWC_SET_MATCH_OPT_RESULT_E_ALLOC |
Memory allocation failed. |
DWC_GetMatchingOption, DWC_GetMOMinCompState, DWC_GetMOSCConnectBlockState, DWC_ClearMOSCConnectBlock, DWC_InitFriendsMatch, DWC_ShutdownFriendsMatch, DWC_ConnectToAnybodyAsync, DWC_ConnectToFriendsAsync, DWCMatchOptMinComplete
02/21/2006 Added a description of optval
01/31/2006 Included a link to the FriendsMatch Library
12/16/2005 Initial version