2023-12-17 03:29:08 -08:00
|
|
|
#pragma once
|
|
|
|
|
2023-12-17 15:00:08 -08:00
|
|
|
#include "EHS.h"
|
|
|
|
#include "Serializer.h"
|
2023-12-17 03:29:08 -08:00
|
|
|
|
|
|
|
#include "Utils.h"
|
|
|
|
|
2023-12-17 15:56:13 -08:00
|
|
|
namespace ehs
|
2023-12-17 03:29:08 -08:00
|
|
|
{
|
|
|
|
class Fragments
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
Header header;
|
|
|
|
Serializer<>* data;
|
|
|
|
UInt_64 size;
|
|
|
|
|
|
|
|
public:
|
|
|
|
~Fragments();
|
|
|
|
|
|
|
|
Fragments();
|
|
|
|
|
|
|
|
Fragments(const Header& header, const Serializer<>& payload);
|
|
|
|
|
|
|
|
Fragments(const Header& header, const UInt_64 size);
|
|
|
|
|
|
|
|
Fragments(const Fragments& frags);
|
|
|
|
|
|
|
|
Fragments& operator=(const Fragments& frags);
|
|
|
|
|
|
|
|
operator const Serializer<>* () const;
|
|
|
|
|
|
|
|
operator Serializer<>* ();
|
|
|
|
|
|
|
|
Header GetHeader() const;
|
|
|
|
|
|
|
|
UInt_64 Size() const;
|
|
|
|
|
|
|
|
bool IsComplete() const;
|
|
|
|
|
|
|
|
Packet Combine() const;
|
|
|
|
};
|
|
|
|
}
|