Refactored various message-related operations into the Message class.
- Replaces the XPCMessage struct. - Messages are now read from a UDPSocket by the Message class. - Printing messages to the log is now handled by the Message class. - In the future, may extend this class with command-specific subclasses that encapsulate additional message parsing functionality.
This commit is contained in:
@@ -19,17 +19,6 @@
|
||||
extern XPLMDataRef multiplayer[20][17];
|
||||
extern XPLMDataRef AIswitch;
|
||||
|
||||
struct XPCMessage
|
||||
{
|
||||
short connectionID;
|
||||
char head[5];
|
||||
char msg[5000];
|
||||
int msglen;
|
||||
struct sockaddr recvaddr;
|
||||
};
|
||||
|
||||
void readMessage(XPC::UDPSocket* socket, struct XPCMessage * pMessage);
|
||||
|
||||
void buildXPLMDataRefs(void);
|
||||
|
||||
int almostequal(float arg1, float arg2, float tol);
|
||||
@@ -39,8 +28,6 @@
|
||||
int test(int buffer);
|
||||
|
||||
unsigned short getIP(struct sockaddr recvaddr, char *IP);
|
||||
|
||||
int printBufferToLog(struct XPCMessage & msg);
|
||||
|
||||
int fmini(int a, int b);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user