DWCMatchedSCCallback

Syntax

#include <dwc.h>

typedef void(*) DWCMatchedSCCallback(DWCError error,
             BOOL cancel,
             BOOL self,
             BOOL isServer,
             int index,
             void *param);

Arguments

error DWC error type.
cancel TRUE: Matchmaking was canceled.
FALSE: Matchmaking was not canceled.
self TRUE: This host successfully connected to the game server, or canceled the connection.
FALSE: Another host succeeded in connecting to the game server, or canceled that connection.
isServer TRUE: When self=FALSE, the above operations have been completed and this host is the game server.
FALSE: Either (when self=FALSE) the above operations have completed and this host is a client, or self=TRUE.
index When self=FALSE, the above operations have been completed, and this argument holds this host's friend roster index. –1 if the host is not a friend or if self=TRUE.
param Callback parameter.

Return Values

None.

Description

This function is called when a single connection has been established or when an error or cancellation has occurred after calling the DWC_ConnectToAnybodyAsync, DWC_ConnectToFriendsAsync, DWC_SetupGameServer, DWC_ConnectToGameServerAsync, or DWC_ConnectToGameServerByGroupID function.

If an error occurs, the values of all arguments other than error and param are undefined.

This callback function can be configured with the DWC_ConnectToAnybodyAsync, DWC_ConnectToFriendsAsync, DWC_SetupGameServer, DWC_ConnectToGameServerAsync, or DWC_ConnectToGameServerByGroupID functions.

Possible combinations of argument values

For error==DWC_ERROR_NONE&&cancel==FALSE:

self

isServer

Content

TRUE

TRUE

None.

TRUE

FALSE

You (this host) are a client, and you have successfully connected to the server and its network. index is -1.

FALSE

TRUE

None.

FALSE

FALSE

You are the server or a client, and another client successfully connected to the server and its network.
index is the friend roster index of that client. If that client is not your friend, index is -1.


For error==DWC_ERROR_NONE&&cancel==TRUE:

self

isServer

Content

TRUE

TRUE

You (this host) are the server, and you have canceled matchmaking. index is -1.

TRUE

FALSE

You are a client, and you have canceled matchmaking. index is -1.

FALSE

TRUE

You are a client, and the server has canceled matchmaking. index is the friend roster index of the server.

FALSE

FALSE

You are the server or a client, and another client has canceled matchmaking.
index is the friend roster index of that client. If that client is not your friend, index is -1.

See Also

DWC_ConnectToAnybodyAsync
DWC_ConnectToFriendsAsync
DWC_SetupGameServer
DWC_ConnectToGameServerAsync DWC_ConnectToGameServerByGroupID

Revision History

2.0.0
Made revisions in line with changes to the specifications used by all matchmaking types.
1.1.0
Fixed broken table.

CONFIDENTIAL