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