Client-Side-Prediction-Test/src/cspt-message.h

18 lines
449 B
C
Raw Normal View History

2023-05-31 19:48:40 +00:00
#ifndef CSPT_MESSAGE_H
#define CSPT_MESSAGE_H
#include <stdint.h>
const char * messageStrings[] = {"HELLO", "GOODBYE", "PING", "PONG"};
typedef struct CsptMessage
{
uint8_t type;
uint8_t content;
} CsptMessage;
/* Message Types:
0 - HELLO: Contents sent to client indicate a given player number.
1 - GOODBYE: No contents, end the connection.
2 - PING: Contents indicate the missed amount of pongs.
3 - PONG: No contents.
*/
#endif