peerJoinRoomCallback

GameSpy SDK

peerJoinRoomCallback

Callback for the following functions: peerJoinTitleRoom, peerJoinGroupRoom, peerJoinStagingRoom, peerJoinStagingRoomByIP, peerCreateStagingRoom[WithSocket].

typedef void (*peerJoinRoomCallback)(
PEER peer,
PEERBool success,
PEERJoinResult result,
RoomType roomType,
void * param );
RoutineRequired HeaderDistribution
peerJoinRoomCallback<peer.h>SDKZIP

Parameters

peer
[in] Initialized peer object
success
[in] PEERTrue if successful, PEERFalse if failure
result
[in] Indicates the result of the attempt
roomType
[in] Can be either TitleRoom, GroupRoom or StagingRoom
param
[in] Pointer to user data. This is optional and will be passed unmodified to the callback function.

Remarks

The peerJoinRoomCallback is called when an attempt to join or create a room has finished. If successful, the local player is now in that room, and will be until he either leaves (with peerLeaveRoom()), is kicked, or the connection is disconnected. If success if PEERFalse, use result to check the reason for the failure. If result is PEERBadPassword the user can be prompted to enter a password, and then the join can be attempted again.

Section Reference: Gamespy Peer SDK