peerCreateStagingRoom

GameSpy SDK

peerCreateStagingRoom

Creates a new staging room with the local player as the host.

void peerCreateStagingRoom(
PEER peer,
const gsi_char * name,
int maxPlayers,
const gsi_char password[PEER_PASSWORD_LEN],
peerJoinRoomCallback callback,
void * param,
PEERBool blocking );
RoutineRequired HeaderDistribution
peerCreateStagingRoom<peer.h>SDKZIP

Parameters

peer
[in] Initialized peer object.
name
[in] Staging room name.
maxPlayers
[in] Maximum number of players allowed in the room.
password
[in] Optional room password.
callback
[in] Callback function to be called when the operation completes.
param
[in] Pointer to user data. This is optional and will be passed unmodified to the callback function.
blocking
[in] When set to PEERTrue, this call will not return until the operation has completed.

Remarks

The peerCreateStagingRoom function creates a new staging room with the local client as the host.  Staging room names are not unique and multiple staging rooms may have the same name. If the password parameter is not NULL or "", this will create a passworded room. The same case-sensitive password needs to be passed into peerJoinStagingRoom[ByIP]() for other player's to join the room. Spaces in passwords are not allowed. Any password with spaces should be stripped of those spaces before calling this function, or a warning to the user will suffice. No more than maxPlayers players will be allowed in the room, unless maxPlayers is set to 0, in which case no limit is set and the maxplayers key is not reported. If the user is in a group room when this function is called, then the room will be reported as being a part of that group (even if the local user then leaves and joins another group).
If successful, the peerQR*Callback() callbacks will start getting called. These are used to provide information about the room to other players. For more information on what to report in the callbacks, see their descriptions. This function is only valid if a title is set. If the user is already in a staging room, this function will fail.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerCreateStagingRoompeerCreateStagingRoomApeerCreateStagingRoomW

peerCreateStagingRoomW and peerCreateStagingRoomA are UNICODE and ANSI mapped versions of peerCreateStagingRoom. The arguments of peerCreateStagingRoomA are ANSI strings; those of peerCreateStagingRoomW are wide-character strings.

Section Reference: Gamespy Peer SDK

See Also: peerJoinStagingRoom