source: network-game/common/Message.h@ 45b2750

Last change on this file since 45b2750 was 5f868c0, checked in by dportnoy <dmp1488@…>, 12 years ago

Added partial server support for new messages for sending item info

  • Property mode set to 100644
File size: 626 bytes
RevLine 
[8e540f4]1#ifndef _MESSAGE_H
[2488852]2#define _MESSAGE_H
[7d7df47]3
[5f868c0]4#define MSG_TYPE_REGISTER 1
5#define MSG_TYPE_LOGIN 2
6#define MSG_TYPE_LOGOUT 3
7#define MSG_TYPE_CHAT 4
8#define MSG_TYPE_PLAYER 5 // server sends this to update player positions
9#define MSG_TYPE_PLAYER_MOVE 6 // client sends this when a player wants to move
10#define MSG_TYPE_OBJECT 7
11#define MSG_TYPE_REMOVE_OBJECT 8
[7d7df47]12
13typedef struct
14{
[0dde5da]15 short type;
16 char buffer[256];
[7d7df47]17} NETWORK_MSG;
18
[a845faf]19int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
20
21int receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
22
[e084950]23#endif
Note: See TracBrowser for help on using the repository browser.