Line | |
---|
1 | #ifndef _MESSAGE_H
|
---|
2 | #define _MESSAGE_H
|
---|
3 |
|
---|
4 | #define MSG_TYPE_ACK 1
|
---|
5 | #define MSG_TYPE_REGISTER 2
|
---|
6 | #define MSG_TYPE_LOGIN 3
|
---|
7 | #define MSG_TYPE_LOGOUT 4
|
---|
8 | #define MSG_TYPE_CHAT 5
|
---|
9 | #define MSG_TYPE_PLAYER 6 // server sends this to update player positions
|
---|
10 | #define MSG_TYPE_PLAYER_MOVE 7 // client sends this when a player wants to move
|
---|
11 | #define MSG_TYPE_OBJECT 8
|
---|
12 | #define MSG_TYPE_REMOVE_OBJECT 9
|
---|
13 | #define MSG_TYPE_PICKUP_FLAG 10
|
---|
14 | #define MSG_TYPE_DROP_FLAG 11
|
---|
15 | #define MSG_TYPE_SCORE 12
|
---|
16 | #define MSG_TYPE_START_ATTACK 13
|
---|
17 | #define MSG_TYPE_ATTACK 14
|
---|
18 | #define MSG_TYPE_PROJECTILE 15
|
---|
19 | #define MSG_TYPE_REMOVE_PROJECTILE 16
|
---|
20 |
|
---|
21 | typedef struct
|
---|
22 | {
|
---|
23 | unsigned int id;
|
---|
24 | unsigned short type;
|
---|
25 | char buffer[256];
|
---|
26 | } NETWORK_MSG;
|
---|
27 |
|
---|
28 | //int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
|
---|
29 |
|
---|
30 | //int receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *source);
|
---|
31 |
|
---|
32 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.