DWC_SetMatchingOption

Syntax

#include <dwc.h>

int DWC_SetMatchingOption( DWCMatchOptType opttype,
                           const void* optval,
                           int optlen );

Description

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 DWC_ConnectToAnybodyAsync and DWC_ConnectToFriendsAsync functions, even when matchmaking does not complete after a fixed amount of time. DWC_GetMOMinCompState function can be used to determine whether or not matchmaking still takes place within the specified amount of time.
DWC_MATCH_OPTION_SC_CONNECT_BLOCK BOOL On the server DS in server-client matchmaking, once a single client DS has successfully connected, no other connections will be accepted.
To start accepting connections again, call the DWC_ClearMOSCConnectBlock function. To determine whether or not connections are blocked, use the DWC_GetMOSCConnectBlockState function.
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).

Arguments

opttype Option for matchmaking type. 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 that corresponds to opttype. The contents are saved inside the library.
optlen The size of the value expressed in optval. Be sure to specify sizeof(optval).

Return Values

DWC_SET_MATCH_OPT_RESULT_SUCCESS Matchmaking options were configured successfully.
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.

See Also

DWC_GetMatchingOption
DWC_GetMOMinCompState
DWC_GetMOSCConnectBlockState
DWC_ClearMOSCConnectBlock
DWC_InitFriendsMatch
DWC_ShutdownFriendsMatch
DWC_ConnectToAnybodyAsync
DWC_ConnectToFriendsAsync
DWCMatchOptMinComplete

Revision History

2006/02/21 Added a description of optval.
2006/01/31 Included a link to the FriendsMatch Library.
2005/12/16 Initial version.


CONFIDENTIAL