44 lines
671 B
C++
44 lines
671 B
C++
#pragma once
|
|
|
|
#include "NetUtils.h"
|
|
|
|
#include <ehs/Serializer.h>
|
|
|
|
namespace ehs
|
|
{
|
|
class NetFrags
|
|
{
|
|
private:
|
|
Header header;
|
|
Serializer<UInt_64>* data;
|
|
UInt_64 size;
|
|
|
|
public:
|
|
~NetFrags();
|
|
|
|
NetFrags();
|
|
|
|
NetFrags(const Header &header, const Serializer<UInt_64> &payload);
|
|
|
|
NetFrags(const Header &header, UInt_64 size);
|
|
|
|
NetFrags(NetFrags &&frags) noexcept;
|
|
|
|
NetFrags(const NetFrags &frags);
|
|
|
|
NetFrags &operator=(NetFrags &&frags) noexcept;
|
|
|
|
NetFrags &operator=(const NetFrags &frags);
|
|
|
|
operator Serializer<UInt_64> *() const;
|
|
|
|
Header GetHeader() const;
|
|
|
|
UInt_64 Size() const;
|
|
|
|
bool IsComplete() const;
|
|
|
|
Packet Combine() const;
|
|
};
|
|
}
|