DWC_ConnectToGameServerByGroupID

Syntax

#include <dwc.h>

BOOL DWC_ConnectToGameServerByGroupID(DWCTopologyType topology,
                                      u32 groupID,
                                      DWCMatchedSCCallback matchedCallback,
                                      void *matchedParam,
                                      DWCNewClientCallback newClientCallback,
                                      void *newClientParam,
                                      DWCConnectAttemptCallback attemptCallback,
                                      u8 *connectionUserData,
                                      void *attemptParam);

Arguments

topology The connection topology. Specified from inside DWCTopologyType.
groupID The connection group ID.
matchedCallback Pointer to the connection completion callback function. This is called for each person who connects.
matchedParam Parameter for the connection completion callback.
newClientCallback Pointer to the new connection client notification callback function.
newClientParam Parameter for the new connection client notification callback function.
attemptCallback Pointer to the connection acceptance callback function.
connectionUserData Pointer to the local host's own connection acceptance parameter buffer. This must be buffer of length u8[DWC_CONNECTION_USERDATA_LEN]. The buffer’s contents will be 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.

Return Values

TRUE Processing begins. The results will be sent through the callback function.
FALSE Not a good state for calling this function.

Description

Tries to re-connect to the server host having the specified group ID. Since the ID of the group that the local host currently belongs to can be obtained using the DWC_GetGroupID function, if the local host saves this ID when it uses matchmaking to connect to someone, as long as that group is accepting client hosts the local host can re-connect even if the connection is cut.

Note that if the group was formed through friend-specified peer matchmaking or server-client matchmaking and its initial server host has dropped out, it will no longer be accepting client hosts.

In addition, because connections made using group IDs do not ask whether the local host has been a member, if the group ID is made public to friends as friend status, it is also possible for the local host to connect to the group a friend belongs to using this group ID.
However, the following problem will arise if the group a host is attempting to join is assumed to be limited to friends.
Usually, when using friend-specified peer matchmaking or server-client matchmaking, only "friends" and "friends of friends" exist within the group, so all communication is between mutual friends. However, if this type of connection by group ID is implemented without any consideration, relationships such as "friend of a friend of a friend" (where communication as mutual friends is impossible) may arise within the same group. In order to maintain communication between mutual friends, it is necessary to confirm that the friend attempting to join in is the server host of the group. The DWC_IsServerMyself function can be used to check whether the local host is the server host.

Revision History

2.0.0
Initial addition.

CONFIDENTIAL