#1 - quicr module

This commit is contained in:
Martin Slachta
2026-07-22 17:34:44 +02:00
parent a04f0dc262
commit f4174eb0c7
177 changed files with 5309 additions and 2265 deletions
@@ -0,0 +1,25 @@
#pragma once
#include "ByteBuffer.hpp"
#include "bytebuffer/ByteBufferCodec.hpp"
namespace tw::net {
struct ByteBufferDecoder {
ByteBufferDecoder(RingByteBuffer& buf) : m_buf(buf) {}
template<typename T>
std::optional<T> push(size_t offset = 0)
{
std::optional<T> s = ByteBufferCodec<T>::bytes(m_buf, offset);
m_buf.skip(sizeof(T));
return s;
}
private:
RingByteBuffer& m_buf;
};
}