[client] Decode InfoRequests
This commit is contained in:
parent
9f0d82e695
commit
bed9148075
2 changed files with 15 additions and 0 deletions
|
@ -6,3 +6,17 @@
|
||||||
InfoRequestMessage::InfoRequestMessage() : PixelMessage()
|
InfoRequestMessage::InfoRequestMessage() : PixelMessage()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InfoRequestMessage::InfoRequestMessage(byte* rawMessage) : PixelMessage(rawMessage)
|
||||||
|
{
|
||||||
|
// The position of the start of the message body
|
||||||
|
char* messageBodyPointer = static_cast<char*>(static_cast<void*>(rawMessage + PixelMessage::MESSAGE_HEADER_LENGTH));
|
||||||
|
|
||||||
|
Key = new char[strlen(messageBodyPointer) + sizeof(char)];
|
||||||
|
strcpy(Key, messageBodyPointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
InfoRequestMessage::~InfoRequestMessage()
|
||||||
|
{
|
||||||
|
delete[] Key;
|
||||||
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ struct InfoRequestMessage : public PixelMessage {
|
||||||
public:
|
public:
|
||||||
InfoRequestMessage();
|
InfoRequestMessage();
|
||||||
~InfoRequestMessage();
|
~InfoRequestMessage();
|
||||||
|
InfoRequestMessage(byte* rawMessage);
|
||||||
|
|
||||||
char* Key;
|
char* Key;
|
||||||
};
|
};
|
||||||
|
|
Reference in a new issue