Network: Threads for Room and RoomMember
This commit is contained in:
parent
5137a198f9
commit
589dc083a5
4 changed files with 119 additions and 13 deletions
|
@ -4,7 +4,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "common/common_types.h"
|
||||
|
@ -19,6 +18,19 @@ struct RoomInformation {
|
|||
u32 member_slots; ///< Maximum number of members in this room
|
||||
};
|
||||
|
||||
// The different types of messages that can be sent. The first byte of each packet defines the type
|
||||
typedef uint8_t MessageID;
|
||||
enum RoomMessageTypes {
|
||||
IdJoinRequest = 1,
|
||||
IdJoinSuccess,
|
||||
IdRoomInformation,
|
||||
IdSetGameName,
|
||||
IdWifiPacket,
|
||||
IdChatMessage,
|
||||
IdNameCollision,
|
||||
IdMacCollision
|
||||
};
|
||||
|
||||
/// This is what a server [person creating a server] would use.
|
||||
class Room final {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue