diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/net.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -3,6 +3,24 @@ #define MAX_PLAYERS 10 +typedef enum +{ + // Specify message type identifier here + msg_type_hello = 0x0 +} msg_type_t; + +typedef struct +{ + uint8_t type; + uint8_t payload_length; +} msg_header_t; + +typedef struct +{ + msg_header_t hdr; + uint8_t payload[]; +} msg_t; + int server_start(const char* port); int* server_get_players(int serversock, const uint8_t count); int client_connect_server(const char* host, const char* port); |
