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

20 lines
431 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"};
struct CsptMessage
2023-05-31 19:48:40 +00:00
{
uint8_t type;
uint8_t content;
};
2023-05-31 19:48:40 +00:00
/* 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.
*/
2023-05-31 19:48:40 +00:00
#endif