Archived
1
0

remove buffer

This commit is contained in:
Jeff Becker
2018-05-06 08:47:31 -04:00
parent 9d33a89bc1
commit 05d27962c4
2 changed files with 0 additions and 36 deletions

View File

@@ -1,17 +0,0 @@
#include <cstring>
#include <nntpchan/buffer.hpp>
namespace nntpchan
{
WriteBuffer::WriteBuffer(const char *b, const size_t s)
{
char *buf = new char[s];
std::memcpy(buf, b, s);
this->b = uv_buf_init(buf, s);
w.data = this;
}
WriteBuffer::WriteBuffer(const std::string &s) : WriteBuffer(s.c_str(), s.size()) {}
WriteBuffer::~WriteBuffer() { delete[] b.base; }
}