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

Last change on this file since a4db787 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
RevLine 
[7d7df47]1#ifndef _MESAGE_H
[2488852]2#define _MESSAGE_H
[7d7df47]3
[0cc431d]4#define MSG_TYPE_LOGIN 1
[171c4fe]5#define MSG_TYPE_LOGOUT 2
6#define MSG_TYPE_CHAT 3
[7d7df47]7
8typedef struct
9{
[0dde5da]10 short type;
11 char buffer[256];
[7d7df47]12} NETWORK_MSG;
13
[a845faf]14int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
15
16int receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
17
[e084950]18#endif
Note: See TracBrowser for help on using the repository browser.