diff options
| author | Mario Kilies <MarioKilies@GMX.net> | 2011-01-24 14:17:55 +0100 |
|---|---|---|
| committer | Mario Kilies <MarioKilies@GMX.net> | 2011-01-24 14:17:55 +0100 |
| commit | 5f956e035e648901645fd43d2e28fc6f8c49a585 (patch) | |
| tree | 60e183934c44934c1c7f5b964f510778962254e9 /src/net/comm.h | |
| parent | 6820c635353b25f12401f8610c140c8608051ded (diff) | |
Huge refactoring of network related code.
Diffstat (limited to 'src/net/comm.h')
| -rw-r--r-- | src/net/comm.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/net/comm.h b/src/net/comm.h index 03816c8..b13d034 100644 --- a/src/net/comm.h +++ b/src/net/comm.h @@ -4,6 +4,9 @@ #include <stdint.h> #include <stdbool.h> +// Specifies the maximum payload length in bytes +#define NET_MSG_MAX_PAYLOAD_LENGTH 255 + // Offsets within the receive buffer to easily access the data fields of the received message #define NET_MSG_OFFSET_TYPE 0 #define NET_MSG_OFFSET_PAYLOAD_LENGTH 1 @@ -14,12 +17,11 @@ typedef enum // Specify message type identifiers here msg_type_hello = 0x0, msg_type_start_game = 0x1, - msg_type_deal_cards = 0x2, - msg_type_init_stacks = 0x3, + msg_type_deal_hand = 0x2, + msg_type_initial_stacks = 0x3, msg_type_selected_card = 0x4, msg_type_selected_stack_c = 0x5, msg_type_selected_stack_s = 0x6, - msg_type_initial_stack = 0x7 } msg_type_t; // Header format @@ -38,6 +40,6 @@ typedef struct // generic network functions bool net_recv(int sock, msg_type_t wanted); -bool net_send(int sock, const msg_type_t type, void* param); +bool net_send(int sock, const msg_type_t type, void *data); #endif // OXEN_NET_H |
