#include <dwc.h>
BOOL DWC_SetupGameServer(
u8 maxEntry,
DWCMatchedSCCallback matchedCallback,
void* matchedParam,
DWCNewClientCallback newClientCallback,
void* newClientParam );
This function starts up one's own DS as a server DS. If there is a request from a client DS, this function performs the connection/disconnection processes. Here, server DS refers to the host that operates as a DS wireless connection parent device for server-client matchmaking. If the server DS is disconnected from the network during matchmaking, the matchmaking ends in an error.
This function starts server-client matchmaking. Connections are accepted from a client DS until either the DWC_CloseAllConnectionsHard
or DWC_ShutdownFriendsMatch
functions are called. Then, if a client DS that has started a connection to one's own DS is detected, a new connection client notification callback is called and, when the connection process of that client DS completes, the connection completion callback is called.
In addition, when DWC_StopSCMatchingAsync
is called during client-server matchmaking, the matchmaking is cancelled and subsequent connections to the client can be denied.
Even for server-client matchmaking, a mesh-type network similar to that of peer matchmaking is built, so even if the server DS disconnects, the remaining client DS consoles will be able to communicate with one another. However, further matchmaking cannot be continued once the server DS has disconnected, so it is recommended that all DS consoles be disconnected when the server DS disconnects.
The client DS uses the DWC_ConnectToGameServerAsync function to connect to the server DS.
maxEntry |
The maximum number of connected players (oneself included). A value from 2 to 32 can be set in this argument. |
matchedCallback |
Pointer to the connection complete callback function. This is called for each person connected. |
matchedParam |
Parameter for the connection completion callback. |
newClientCallback |
The pointer to the new connection client notification callback function. |
newClientParam |
Parameter for the new-connection client notification callback. |
TRUE |
Processing has been started and the result is going to be returned with a callback. |
FALSE |
Not a good state for calling this function. |
DWC_ConnectToGameServerAsync, DWC_CloseAllConnectionsHard, DWC_ShutdownFriendsMatch, DWC_StopSCMatchingAsync, DWCMatchedSCCallback, DWCNewClientCallback
06/20/2006 Revised an error in the description of the return values.
12/16/2005 Initial version.