source: network-game/common/message.h@ d2b411a

Last change on this file since d2b411a was 0cc431d, checked in by dportnoy <dmp1488@…>, 12 years ago

Added a state to the client and began using message types. Created a simple system for sending the username to the server before being logged in

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