#include <dwc.h>
typedef void(*) DWCMatchedSCCallback(DWCError error,
BOOL cancel,
BOOL self,
BOOL isServer,
int index,
void *param);error |
DWC error type. For details, see DWC_GetLastErrorEx. |
cancel |
TRUE: Matchmaking was canceled. FALSE: Matchmaking was not canceled. |
self |
TRUE: The local 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 host that completed the above operations is the server. FALSE: Either self=TRUE, or if self=FALSE, the host that completed the above operations is a client. |
index |
When self=FALSE, this argument holds the friend roster index of the host that completed the above operations. Set to –1 if the host is not a friend or if self=TRUE. |
param |
Callback parameter. |
None.
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.
For error==DWC_ERROR_NONE&&cancel==FALSE:
| self | isServer | Description |
| TRUE | TRUE | None. |
| TRUE | FALSE |
The local host is a client and has successfully connected to the server and its network. The index is -1.
|
| FALSE | TRUE | None. |
| FALSE | FALSE |
The local host is the server or a client, and another client successfully connected to the server and its network. The index argument is the friend roster index of that client in the local host's friend roster. If that client is not a friend of the local host, index is -1.
|
For error==DWC_ERROR_NONE&&cancel==TRUE:
| self | isServer | Description |
| TRUE | TRUE |
The local host is the server and has canceled matchmaking. The index is -1.
|
| TRUE | FALSE |
The local host is a client and has canceled matchmaking. The index is -1.
|
| FALSE | TRUE |
The local host is a client, and the server has canceled matchmaking. The index is the friend roster index of the server.
|
| FALSE | FALSE |
The local host is the server or a client, and another client has canceled matchmaking. The index argument is the friend roster index of that client in the local host's friend roster. If that client is not a friend of the local host, index is -1.
|
Note: The terms "server" and "client" used in the text refer to Wii or DS terminals, not GameSpy servers.
DWC_ConnectToAnybodyAsync
DWC_ConnectToFriendsAsync
DWC_SetupGameServer
DWC_ConnectToGameServerAsync
DWC_ConnectToGameServerByGroupID
For the changelog prior to 5.1 PR2, click here.
CONFIDENTIAL