7 // timeout at 5 seconds
8 // 1 is really too long but we will be nice
9 #define ALARM_TIMEOUT 10
11 // you may need a lot, you may need a little
12 #define MAX_MESSAGES 200
14 #define RELEASE_OBJ(x) \
38 // have to be careful, dont want
41 // most messages will revolve around
43 typedef struct tagMsg
{
47 int msg_id
; // the index
48 int object_id
; // the client connect id
63 typedef struct tagMsgList
{
69 Msg
*CreateMsgObj(void);
70 void Create_Msg_List(void);
71 void Delete_Msg_List(void);
72 void Print_Msg_List(void);
75 void Msg_AddQueue(int msg_type
, int move_type
, int obj_id
, float px
, float py
, float h
);
76 void *Convert_MsgList(void);
77 Msg
*GetMsgCluster(void);
78 void Print_MsgTest(void);
80 void Clear_FirstMsg(void);
84 void Start_Net_Time(void);
85 void End_Net_Time(void);
86 void Print_Net_Time(void);
87 void Send_Net_Packet(int sock
, int serv_sock
);
88 void Recv_Net_Packet(int sock
, int serv_sock
);
90 MsgPtr
Get_FirstMsg(void);
92 int Get_MessageCount(void);
94 void Set_MsgIndex(int val
);
95 void Set_MsgId(int val
);
96 Msg
*Get_Messages(int *msg_count
, int *msg_id
);
97 void *Finalize_Messages(int *res_count
);
98 void Reset_Message(void);