ConnectX 3.0
ConnectX Game Suite
Loading...
Searching...
No Matches
messagetype.hpp File Reference
#include <cstdint>
#include <string>
Include dependency graph for messagetype.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  MessageType : uint8_t {
  REQ_CONNECT = 0x01 , RES_CONNECT = 0x02 , DISCONNECT = 0x03 , HEARTBEAT = 0x04 ,
  MAKE_MOVE = 0x10 , MOVE_RESULT = 0x11 , GAME_STATE_UPDATE = 0x12 , REQ_CREATE_GAME = 0x20 ,
  RES_CREATE_GAME = 0x21 , REQ_LIST_GAMES = 0x22 , RES_LIST_GAMES = 0x23 , REQ_JOIN_GAME = 0x24 ,
  RES_JOIN_GAME = 0x25 , ERROR = 0xFF
}
 

Functions

std::string messageTypeToString (MessageType type)
 

Enumeration Type Documentation

◆ MessageType

enum class MessageType : uint8_t
strong

All possible message types in the protocol

Enumerator
REQ_CONNECT 
RES_CONNECT 
DISCONNECT 
HEARTBEAT 
MAKE_MOVE 
MOVE_RESULT 
GAME_STATE_UPDATE 
REQ_CREATE_GAME 
RES_CREATE_GAME 
REQ_LIST_GAMES 
RES_LIST_GAMES 
REQ_JOIN_GAME 
RES_JOIN_GAME 
ERROR 

Function Documentation

◆ messageTypeToString()

std::string messageTypeToString ( MessageType  type)

Convert MessageType to string for logging/debugging