Network: Enable sending and receiving chat messages
This commit is contained in:
parent
35a0b32553
commit
42e57c1218
3 changed files with 79 additions and 0 deletions
|
@ -24,6 +24,12 @@ struct WifiPacket {
|
|||
uint8_t channel; ///< WiFi channel where this frame was transmitted.
|
||||
};
|
||||
|
||||
/// Represents a chat message.
|
||||
struct ChatEntry {
|
||||
std::string nickname; ///< Nickname of the client who sent this message.
|
||||
std::string message; ///< Body of the message.
|
||||
};
|
||||
|
||||
/**
|
||||
* This is what a client [person joining a server] would use.
|
||||
* It also has to be used if you host a game yourself (You'd create both, a Room and a
|
||||
|
@ -87,6 +93,12 @@ public:
|
|||
*/
|
||||
void SendWifiPacket(const WifiPacket& packet);
|
||||
|
||||
/**
|
||||
* Sends a chat message to the room.
|
||||
* @param message The contents of the message.
|
||||
*/
|
||||
void SendChatMessage(const std::string& message);
|
||||
|
||||
/**
|
||||
* Leaves the current room.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue