Rename to flat_buffer, basic_flat_buffer (API Change):

These classes are renamed:

* flat_streambuf to flat_buffer
* basic_flat_streambuf to basic_flat_buffer
This commit is contained in:
Vinnie Falco committed 2017-07-20 08:12:16 -07:00
1 parent 24fd254690
commit 6e47e9a0ac
14 files changed
+167 -165

No files matched your search

+15 -15
View File
@@ -5,7 +5,7 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include <beast/core/flat_streambuf.hpp>
#include <beast/core/flat_buffer.hpp>
#include <beast/core/prepare_buffers.hpp>
#include <beast/http/chunk_encode.hpp>
#include <beast/http/read.hpp>
@@ -104,7 +104,7 @@ public:
"*"
};
message<true, direct_body, fields> m;
flat_streambuf b{1024};
flat_buffer b{1024};
read(is, b, m);
BEAST_EXPECT(m.body == "*");
}
@@ -117,7 +117,7 @@ public:
"*"
};
message<false, direct_body, fields> m;
flat_streambuf b{20};
flat_buffer b{20};
read(is, b, m);
BEAST_EXPECT(m.body == "*");
}
@@ -133,7 +133,7 @@ public:
"0\r\n\r\n"
};
message<true, direct_body, fields> m;
flat_streambuf b{100};
flat_buffer b{100};
read(is, b, m);
BEAST_EXPECT(m.body == "*");
}
@@ -201,7 +201,7 @@ public:
"*"
};
message<true, indirect_body, fields> m;
flat_streambuf b{1024};
flat_buffer b{1024};
read(is, b, m);
BEAST_EXPECT(m.body == "*");
}
@@ -214,7 +214,7 @@ public:
"*"
};
message<false, indirect_body, fields> m;
flat_streambuf b{20};
flat_buffer b{20};
read(is, b, m);
BEAST_EXPECT(m.body == "*");
}
@@ -231,7 +231,7 @@ public:
"0\r\n\r\n"
};
message<true, indirect_body, fields> m;
flat_streambuf b{1024};
flat_buffer b{1024};
read(is, b, m);
BEAST_EXPECT(m.body == "*");
}
@@ -253,7 +253,7 @@ public:
"*****"
};
header_parser<true, fields> p;
flat_streambuf b{38};
flat_buffer b{38};
auto const bytes_used =
read_some(is, b, p);
b.consume(bytes_used);
@@ -272,7 +272,7 @@ public:
"*****"
};
header_parser<false, fields> p;
flat_streambuf b{20};
flat_buffer b{20};
auto const bytes_used =
read_some(is, b, p);
b.consume(bytes_used);
@@ -303,7 +303,7 @@ public:
};
header_parser<true, fields> p;
flat_streambuf b{128};
flat_buffer b{128};
auto const bytes_used =
read_some(is, b, p);
b.consume(bytes_used);
@@ -335,7 +335,7 @@ public:
DynamicBuffer& b,
SyncReadStream& in)
{
flat_streambuf buffer{4096}; // 4K limit
flat_buffer buffer{4096}; // 4K limit
header_parser<isRequest, fields> parser;
error_code ec;
do
@@ -397,7 +397,7 @@ public:
3 // max_read
};
test::string_ostream os{ios_};
flat_streambuf b{16};
flat_buffer b{16};
relay<true>(os, b, is);
}
@@ -410,7 +410,7 @@ public:
3 // max_read
};
test::string_ostream os{ios_};
flat_streambuf b{16};
flat_buffer b{16};
relay<false>(os, b, is);
}
@@ -427,7 +427,7 @@ public:
2 // max_read
};
test::string_ostream os{ios_};
flat_streambuf b{16};
flat_buffer b{16};
relay<true>(os, b, is);
}
}
@@ -444,7 +444,7 @@ public:
void
doFixedRead(SyncReadStream& stream, BodyCallback const& cb)
{
flat_streambuf buffer{4096}; // 4K limit
flat_buffer buffer{4096}; // 4K limit
header_parser<isRequest, fields> parser;
std::size_t bytes_used;
bytes_used = read_some(stream, buffer, parser);
+3 -3
View File
@@ -8,7 +8,7 @@
// Test that header file is self-contained.
#include <beast/http/header_parser.hpp>
#include <beast/core/flat_streambuf.hpp>
#include <beast/core/flat_buffer.hpp>
#include <beast/http/read.hpp>
#include <beast/unit_test/suite.hpp>
#include <beast/test/string_istream.hpp>
@@ -31,7 +31,7 @@ public:
"User-Agent: test\r\n"
"\r\n"
};
flat_streambuf db{1024};
flat_buffer db{1024};
header_parser<true, fields> p;
read_some(is, db, p);
BEAST_EXPECT(p.is_complete());
@@ -44,7 +44,7 @@ public:
"\r\n"
"*"
};
flat_streambuf db{1024};
flat_buffer db{1024};
header_parser<true, fields> p;
read_some(is, db, p);
BEAST_EXPECT(! p.is_complete());
+3 -3
View File
@@ -14,7 +14,7 @@
#include <beast/test/string_istream.hpp>
#include <beast/test/string_ostream.hpp>
#include <beast/test/yield_to.hpp>
#include <beast/core/flat_streambuf.hpp>
#include <beast/core/flat_buffer.hpp>
#include <beast/core/multi_buffer.hpp>
#include <beast/http/header_parser.hpp>
#include <beast/http/read.hpp>
@@ -39,7 +39,7 @@ public:
#if 0
multi_buffer dynabuf;
#else
flat_streambuf dynabuf{1024};
flat_buffer dynabuf{1024};
#endif
message<isRequest, string_body, fields> m;
read(ss, dynabuf, m, ec);
@@ -124,7 +124,7 @@ public:
"Content-Length: 1\r\n"
"\r\n"
"*"};
flat_streambuf b{1024};
flat_buffer b{1024};
message_parser<true, string_body, fields> p;
read(is, b, p, ec);
auto const& m = p.get();