peerRoomMessageCallback
Called when a message is sent to a room the local player is in.
- typedef void (*peerRoomMessageCallback)(
- PEER peer,
- RoomType roomType,
- const gsi_char * nick,
- const gsi_char * message,
- MessageType messageType,
- void * param );
Routine | Required Header | Distribution |
---|---|---|
peerRoomMessageCallback | <peer.h> | SDKZIP |
Parameters
- peer
- [in] Initialized peer object
- roomType
- [in] Can be either TitleRoom, GroupRoom or StagingRoom.
- nick
- [in] The chat nickname of the player who sent the message
- message
- [in] The message that was sent from the player
- messageType
- [in] The type of message to send, most commonly NormalMessage or ActionMessage
- param
- [in] Pointer to user data. This is optional and will be passed unmodified to the callback function.
Remarks
The peerRoomMessageCallback function gets called when a player sends a message. This message is sent to everyone in the specified room. The message will be a plain text message.
Unicode Mappings
Routine | GSI_UNICODE Not Defined | GSI_UNICODE Defined |
---|---|---|
peerRoomMessageCallback | peerRoomMessageCallbackA | peerRoomMessageCallbackW |
peerRoomMessageCallbackW and peerRoomMessageCallbackA are UNICODE and ANSI mapped versions of peerRoomMessageCallback. The arguments of peerRoomMessageCallbackA are ANSI strings; those of peerRoomMessageCallbackW are wide-character strings.
Section Reference: Gamespy Peer SDK