peerStartAutoMatch

GameSpy SDK

peerStartAutoMatch

Start an automatch attempt.

void peerStartAutoMatch(
PEER peer,
int maxPlayers,
const gsi_char * filter,
peerAutoMatchStatusCallback statusCallback,
peerAutoMatchRateCallback rateCallback,
void * param,
PEERBool blocking );
RoutineRequired HeaderDistribution
peerStartAutoMatch<peer.h>SDKZIP

Parameters

peer
[in] Initialized peer object.
maxPlayers
[in] Total number of players to match. (Includes local player).
filter
[in] Hard filter for returned server list.
statusCallback
[in] Callback function to be called when the status changes.
rateCallback
[in] Callback function to be called when a potential match should be rated.
param
[in] Pointer to user data. This is optional and will be passed unmodified to the callback function.
blocking
[in] When set to PEERTrue this function will not return until the operation has completed.

Remarks

The peerStartAutoMatch function begins the AutoMatch process. The function takes a maxPlayers parameter, which specifices the maximum number of people that should be in the final match. For example, if the local player wants to player a 3v3 match, maxPlayers should be 6. The match can be started before the maxPlayers is reached, for example if an exact number of players is not needed, but an upper limit must still be specified.
The filter is a SQL-type filter, just like the filter used in peerStartListingGames(). It is used to rule out matches that are not acceptable. Potential matches that do not pass the filter will not be passed to the rating callback. The statusCallback is called whenever the status of the match changes, until either peerStopAutoMatch() is called, or the statusCallback is called with a status of PEERFailed or PEERComplete. The rateCallback is used to rate possible matches.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerStartAutoMatchpeerStartAutoMatchApeerStartAutoMatchW

peerStartAutoMatchW and peerStartAutoMatchA are UNICODE and ANSI mapped versions of peerStartAutoMatch. The arguments of peerStartAutoMatchA are ANSI strings; those of peerStartAutoMatchW are wide-character strings.

Section Reference: Gamespy Peer SDK