source: network-game/common/message.h@ 73f75c1

Last change on this file since 73f75c1 was 171c4fe, checked in by dportnoy <dmp1488@…>, 12 years ago

Added a logout message and the ability for the client to save it's username once it logs in

  • Property mode set to 100644
File size: 340 bytes
Line 
1#ifndef _MESAGE_H
2#define _MESSAGE_H
3
4#define MSG_TYPE_LOGIN 1
5#define MSG_TYPE_LOGOUT 2
6#define MSG_TYPE_CHAT 3
7
8typedef struct
9{
10 short type;
11 char buffer[256];
12} NETWORK_MSG;
13
14int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
15
16int receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
17
18#endif
Note: See TracBrowser for help on using the repository browser.