DWC_GetNumConnectionHost

Syntax

#include <dwc.h>

int DWC_GetNumConnectionHost(void);

Arguments

None.

Return Values

The number of connected hosts, including the local host. The number of connections currently undergoing matchmaking are counted.
This function returns zero if called when the FriendsMatch Library is not running.

Description

This function gets the number of connected hosts, including the local host.

Use this function after the matchmaking completion callback (DWCMatchedSCCallback) succeeds and the local host has connected to another player at least once. If the local host has not yet established a connection with any other player, the return value will be undefined. Make sure not to use the returned value in this case.

There is one exception to the above restriction. As long as the host has been started as a server by the DWC_SetupGameServer function, this function will start returning 1 some time after DWC_SetupGameServer is called, even if the host has not yet established a connection with any other player.

Revision History

2.0.0
Added an explanation of the states in which this function can be used.

CONFIDENTIAL