Restructure joyent message parser (from Node.js):

* New http::raw_parser wrapper
* Convert parser errors to error_code
* Enumeration and strings for parsed HTTP method
* Move parser engine into joyent namespace
* Rename includes to be distinct
This commit is contained in:
Vinnie Falco
2014-03-19 09:24:51 -07:00
parent d4a5c0353d
commit 78ec5ccdbc
14 changed files with 812 additions and 70 deletions

View File

@@ -25,6 +25,7 @@
#include <boost/asio/buffer.hpp>
#include <cstddef>
#include <memory>
#include <type_traits>
namespace beast {
@@ -38,8 +39,9 @@ class memory_buffer
: private empty_base_optimization <Alloc>
{
private:
static_assert (std::is_trivially_constructible <T>::value,
"T must be trivially constructible");
static_assert (std::is_same <char, T>::value ||
std::is_same <unsigned char, T>::value,
"memory_buffer only works with char and unsigned char");
typedef empty_base_optimization <Alloc> Base;