source:
network-game/common/Message.h@
cee623e
Last change on this file since cee623e was edfd1d0, checked in by , 12 years ago | |
---|---|
|
|
File size: 423 bytes |
Rev | Line | |
---|---|---|
[8e540f4] | 1 | #ifndef _MESSAGE_H |
[2488852] | 2 | #define _MESSAGE_H |
[7d7df47] | 3 | |
[2318fff] | 4 | #define MSG_TYPE_REGISTER 1 |
5 | #define MSG_TYPE_LOGIN 2 | |
6 | #define MSG_TYPE_LOGOUT 3 | |
7 | #define MSG_TYPE_CHAT 4 | |
[edfd1d0] | 8 | #define MSG_TYPE_PLAYER 5 |
[7d7df47] | 9 | |
10 | typedef struct | |
11 | { | |
[0dde5da] | 12 | short type; |
13 | char buffer[256]; | |
[7d7df47] | 14 | } NETWORK_MSG; |
15 | ||
[a845faf] | 16 | int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest); |
17 | ||
18 | int receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest); | |
19 | ||
[e084950] | 20 | #endif |
Note:
See TracBrowser
for help on using the repository browser.