Last change
on this file since 227baaa was 60b77d2, checked in by dportnoy <dmp1488@…>, 12 years ago |
Added a Map class
|
-
Property mode
set to
100644
|
File size:
554 bytes
|
Line | |
---|
1 | #ifndef _MESSAGE_H
|
---|
2 | #define _MESSAGE_H
|
---|
3 |
|
---|
4 | #define MSG_TYPE_REGISTER 1
|
---|
5 | #define MSG_TYPE_LOGIN 2
|
---|
6 | #define MSG_TYPE_LOGOUT 3
|
---|
7 | #define MSG_TYPE_CHAT 4
|
---|
8 | #define MSG_TYPE_PLAYER 5 // server sends this to update player positions
|
---|
9 | #define MSG_TYPE_PLAYER_MOVE 6 // client sends this when a player wants to move
|
---|
10 |
|
---|
11 | typedef struct
|
---|
12 | {
|
---|
13 | short type;
|
---|
14 | char buffer[256];
|
---|
15 | } NETWORK_MSG;
|
---|
16 |
|
---|
17 | int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
|
---|
18 |
|
---|
19 | int receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
|
---|
20 |
|
---|
21 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.