28 #ifndef HTTP_PARSER_RESPONSE_HPP
29 #define HTTP_PARSER_RESPONSE_HPP
34 #include <websocketpp/http/parser.hpp>
57 class response :
public parser {
59 typedef response type;
60 typedef lib::shared_ptr<type> ptr;
64 , m_buf(lib::make_shared<std::string>())
65 , m_status_code(status_code::uninitialized)
66 , m_state(RESPONSE_LINE) {}
117 return m_state == DONE;
122 return (m_state == BODY || m_state == DONE);
149 void set_status(status_code::value code, std::string
const & msg);
153 return m_status_code;
162 void process(std::string::iterator begin, std::string::iterator end);
165 size_t process_body(
char const * buf, size_t len);
174 std::string m_status_msg;
176 lib::shared_ptr<std::string> m_buf;
177 status_code::value m_status_code;
186 #include <websocketpp/http/impl/response.hpp>