#include <dwc.h>
BOOL DWC_ConnectToFriendsAsync(
const u8 friendIdxList[],
int friendIdxListLen,
u8 numEntry,
BOOL distantFriend,
DWCMatchedCallback matchedCallback,
void* matchedParam,
DWCEvalPlayerCallback evalCallback,
void* evalParam);
This function specifies friends, makes connections, and creates a mesh-type network. This is known as peer matchmaking by specifying friends.
The argument friendIdxList
specifies a pointer to the array of indices collected in the friend roster of the friend with whom matchmaking is intended. If NULL
is specified in the index list, all friends in the friends roster are candidates for matchmaking. The friend roster that is referenced during peer matchmaking by specifying friends is specified with the DWC_InitFriendsMatch function.
If FALSE is specified in the distantFriend
argument, only players who have mutual friend relationships remain in the mesh-type network after matchmaking completes. If TRUE is specified, one player has a mutual player relationships with all the other players, but the other players do not have a mutual friend relationship but are friends of friends. Since each of the players is likely to have a different friend list or friend index list, the rate of successful matchmaking will drop sharply when FALSE is specified.
Also, if the argument evalCallback
is specified, each time a matchmaking candidate player is found, the designated evaluation callback function is called. The matchmaking index key can be referenced by using the DWC_GetMatchIntValue
or DWC_GetMatchStringValue
function inside the evaluation callback function. Be sure to evaluate the player based on that value, and return the evaluation value as the return value. Players with an evaluation value of 0 or less are excluded from matchmaking.
When connecting to specified friends through peer matchmaking, exactly one person is found as a candidate player at a time. If the evaluation value is greater than 0, matchmaking will commence. If the value is 0 or lower, no matchmaking will take place.
If the DWC_ProcessFriendsMatch function is continually called after calling this function, the matchmaking process will continue. The matchmaking completion callback will be called if the matchmaking results in a success, an error, or a cancellation.
friendIdxList |
Pointer to the friend index list used for requesting connections. If NULL, then the entire friend roster becomes the connection request target. |
friendIdxListLen |
The length of the friend index list used for requesting connections. The maximum value is 64, just like the length of the friend roster. |
numEntry |
The number of people (including oneself) to make up the requested network. A value from 2 to 32 can be set in this argument. |
distantFriend |
TRUE: Connections to friends of friends permitted. FALSE: Not permitted. |
matchedCallback |
The pointer to the matchmaking completion callback function. |
matchedParam |
The parameter for the matchmaking completion callback. |
evalCallback |
The pointer to the player evaluation callback function. |
evalParam |
Parameter for player evaluation callback. |
TRUE |
The process starts. The results are indicated via the callback function. |
FALSE |
Not a good state for calling this function. |
DWC_ConnectToAnybodyAsync, DWC_AddMatchKey*, DWC_GetMatch*Value, DWCMatchedCallback, DWCEvalPlayerCallback, DWC_ProcessFriendsMatch
01/18/2006 Revised the description of the function description arguments friendIdxList and distantFriend.
12/16/2005 Added a detailed description of the function. Corrected errors in Return Values.
07/22/2005 Initial version.