lokinet/include/llarp/iwp/sendbuf.hpp
sachaaaaa 6f055eca4f Extracted structs out of iwp_link.cpp
to rebase

to rebase
2018-07-09 15:01:15 +10:00

35 lines
355 B
C++

#pragma once
#include "llarp/buffer.h"
#include <queue>
struct sendbuf_t
{
sendbuf_t(size_t s) : sz(s)
{
buf = new byte_t[s];
}
~sendbuf_t()
{
delete[] buf;
}
byte_t *buf;
size_t sz;
size_t
size() const
{
return sz;
}
byte_t *
data()
{
return buf;
}
};
typedef std::queue< sendbuf_t * > sendqueue_t;