PEERCallbacks
Structure that gets passed into peerInitialize().
- typedef struct
- {
- peerDisconnectedCallback disconnected;
- peerRoomMessageCallback roomMessage;
- peerRoomUTMCallback roomUTM;
- peerRoomNameChangedCallback roomNameChanged;
- peerRoomModeChangedCallback roomModeChanged;
- peerPlayerMessageCallback playerMessage;
- peerPlayerUTMCallback playerUTM;
- peerReadyChangedCallback readyChanged;
- peerGameStartedCallback gameStarted;
- peerPlayerJoinedCallback playerJoined;
- peerPlayerLeftCallback playerLeft;
- peerKickedCallback kicked;
- peerNewPlayerListCallback newPlayerList;
- peerPlayerChangedNickCallback playerChangedNick;
- peerPlayerInfoCallback playerInfo;
- peerPlayerFlagsChangedCallback playerFlagsChanged;
- peerPingCallback ping;
- peerCrossPingCallback crossPing;
- peerGlobalKeyChangedCallback globalKeyChanged;
- peerRoomKeyChangedCallback roomKeyChanged;
- peerQRServerKeyCallback qrServerKey;
- peerQRPlayerKeyCallback qrPlayerKey;
- peerQRTeamKeyCallback qrTeamKey;
- peerQRKeyListCallback qrKeyList;
- peerQRCountCallback qrCount;
- peerQRAddErrorCallback qrAddError;
- peerQRNatNegotiateCallback qrNatNegotiateCallback;
- peerQRPublicAddressCallback qrPublicAddressCallback;
- void * param;
- } PEERCallbacks;
Members
- disconnected
- Called when the chat connection has been disconnected by the server.
- roomMessage
- Called when a chat message has arrived in one of the rooms the developer is in.
- roomUTM
- Called when an under-the-table message has arrived in a room the developer is in.
- roomNameChanged
- Called when the name of a room the developer is in has changed.
- roomModeChanged
- Called when the mode changed in a room the developer is in.
- playerMessage
- Called when a private chat message from another player has been received.
- playerUTM
- Called when an under-the-table message has arrived from another player.
- readyChanged
- Called when another player in the same staging room as the user, has changed his ready status.
- gameStarted
- Called when the host in the staging room launches the game.
- playerJoined
- Called when a player has joined one of the rooms the local player has joined.
- playerLeft
- Called when a player has left one of the rooms the local player has joined.
- kicked
- Called when the local player has been kicked from a room.
- newPlayerList
- Called when the entire playerlist has been updated.
- playerChangedNick
- Called when player in one of the rooms changed his nick.
- playerInfo
- Called for all players (who are using peer) in a room shortly after joining.
- playerFlagsChanged
- for all players (who are using peer) in a room
Called when a player's flags have changed. - crossPing
- An updated ping for a player, who may be in any room(s).
- qrServerKey
- Called for watch keys when a room is joined, for watch keys when another player joins, and for any newly set watch keys.
- qrPlayerKey
- Called to report QR player keys.
- qrTeamKey
- Called to report QR team keys.
- qrKeyList
- Called to get a list of keys to be reported.
- qrCount
- Called to get a count of the number of players or teams.
- qrAddError
- Called when there is an error reporting the server.
- qrNatNegotiateCallback
- Called when hosting a server and a nat-negotiate cookie is received.
- qrPublicAddressCallback
- Called when hosting a server with the server's public reporting address.
- param
- A pointer to data that will be passed into each of the callbacks when triggered.
Section Reference: Gamespy Peer SDK
See Also: peerInitialize