DWC_SetupGameServer

Syntax

#include <dwc.h>
 
BOOL DWC_SetupGameServer(
             u8    maxEntry,
             DWCMatchedSCCallback matchedCallback,
             void* matchedParam,
             DWCNewClientCallback newClientCallback,
             void* newClientParam );	

Description

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 is the host that operates as the parent in server-client matchmaking for DS Wireless Play. If the server DS disconnects from the network during matchmaking, the matchmaking process will end 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.

Arguments

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.

Return Values

TRUE Processing completed.
FALSE Not a good state for calling this function.

See Also

DWC_ConnectToGameServerAsync
DWC_CloseAllConnectionsHard
DWC_ShutdownFriendsMatch
DWC_StopSCMatchingAsync
DWCMatchedSCCallback
DWCNewClientCallback

Revision History

2008/01/09 Corrected terminology errors.
2006/06/20 Corrected a mistake in explanation of return values.
2005/12/16 Initial version.


CONFIDENTIAL