-
Notifications
You must be signed in to change notification settings - Fork 2
Communication Scheme
The 9Cards example project tries to make full use of the possibilities offered by XMPP. This is accomodated by using the Multi User Chat (MUC) for the major part of the communication. The MUC not only allows for sending group messages into the chat room, but also supports private messages to single users as well as assigning different roles, such as admin or common participant, to specific users. Another reason for using the MUC is the set of Listeners which are being provided, allowing to react to the joining or leaving of users as well as to changes of roles or affilitations.
In spite of all those advantages, there's still a need to use another way of communication, because joining a game-specific MUC room firstly requires to create or join a game. Hence there are several out-of-MUC messages which are needed for creating, configuring or joining a game before the MUC room can be used.
The following scheme of communication therefore starts with the out-of-MUC IQs for creating, configuring or joining a game, while all the messages down from the start of the game are being sent via the MUC.
- Messages
- ConfigureGameRequest, ConfigureGameResponse
- GetGameConfigurationRequest, GetGameConfigurationResponse
- StartGameMessage, GameStartsMessage
- PlayCardMessage, CardPlayedMessage
- RoundCompleteMessage, GameOverMessage
- Sequence
Up: Home