[Yunq] Move serialization to yunq library.
This commit is contained in:
parent
0135d8d844
commit
7ec4f696a8
9 changed files with 316 additions and 486 deletions
|
|
@ -6,23 +6,10 @@
|
|||
#include <glacier/status/error_or.h>
|
||||
#include <glacier/status/status.h>
|
||||
|
||||
#include "yunq/yunq.h"
|
||||
|
||||
namespace yunq {
|
||||
|
||||
const uint64_t kHeaderSize = 24; // 4x uint32, 1x uint64
|
||||
|
||||
struct MessageHeader {
|
||||
uint32_t ident;
|
||||
uint32_t core_length;
|
||||
uint32_t length;
|
||||
uint32_t crc32;
|
||||
uint64_t options;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ExtensionPointer {
|
||||
uint32_t offset;
|
||||
uint32_t length;
|
||||
};
|
||||
|
||||
class MessageView {
|
||||
public:
|
||||
MessageView(const glcr::ByteBuffer& buffer, uint64_t offset)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue