EHS/include/ehs/io/socket/ehc/Fragments.h

44 lines
681 B
C++

#pragma once
#include "Utils.h"
#include <ehs/Serializer.h>
namespace ehs
{
class Fragments
{
private:
Header header;
Serializer<UInt_64>* data;
UInt_64 size;
public:
~Fragments();
Fragments();
Fragments(const Header &header, const Serializer<UInt_64> &payload);
Fragments(const Header &header, UInt_64 size);
Fragments(Fragments &&frags) noexcept;
Fragments(const Fragments &frags);
Fragments &operator=(Fragments &&frags) noexcept;
Fragments &operator=(const Fragments &frags);
operator Serializer<UInt_64> *() const;
Header GetHeader() const;
UInt_64 Size() const;
bool IsComplete() const;
Packet Combine() const;
};
}