#include <dwc.h>
BOOL DWC_SetupGameServer(DWCTopologyType topology,
u8 maxEntry,
DWCMatchedSCCallback matchedCallback,
void *matchedParam,
DWCNewClientCallback newClientCallback,
void *newClientParam,
DWCConnectAttemptCallback attemptCallback,
u8 *connectionUserData,
void *attemptParam);topology |
The connection topology. Specified as a DWCTopologyType. |
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. |
attemptCallback |
Pointer to the connection-acceptance callback function. |
connectionUserData |
Pointer to own connection-acceptance parameter buffer. It must be a buffer of length u8[DWC_CONNECTION_USERDATA_LEN]. The buffer's contents are copied to the library, so it can be deallocated once this function is called. If NULL is specified, zeros are set for the entire content of the local buffer that is used for determining whether to accept a connection. |
attemptParam |
Parameter for the connection-acceptance callback. |
TRUE |
Processing completed. |
FALSE |
Not a good state for calling this function. |
Starts up the local host as a server host. If there are requests from client hosts, this function performs the connection/disconnection processes. A server host in this context refers to a host that behaves as a parent device in DS wireless communication (see Note) during server-client matchmaking.
This function starts server-client matchmaking. Connections are accepted from client hosts until either the DWC_CloseAllConnectionsHard or DWC_ShutdownFriendsMatch function is called. Then, if a client host that has started a connection to one's own local host is detected, a new connection client notification callback is called, and the connection-completion callback is called once the connection process of that client host completes.
The client host uses the DWC_ConnectToGameServerAsync function to connect to the server host.
Depending on the condition of the network connection, the process might be blocked and not return from the function for some time.
Note: "DS wireless communications" refers to local wireless communication using the Nintendo DS. Communication occurs directly between Nintendo DS systems with a proprietary protocol; access points are not used. The network consists of a single parent device and multiple child devices connected to the parent.
For the changelog prior to 5.1 PR2, click here.
CONFIDENTIAL