28#ifndef HTTP_PARSER_RESPONSE_HPP
29#define HTTP_PARSER_RESPONSE_HPP
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);
126 std::string
raw()
const;
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;
Stores, parses, and manipulates HTTP responses.
void set_status(status_code::value code)
Set response status code and message.
std::string raw() const
Returns the full raw response.
bool headers_ready() const
Returns true if the response headers are fully parsed.
lib::shared_ptr< type > ptr
bool ready() const
Returns true if the response is ready.
const std::string & get_status_msg() const
Return the response status message.
status_code::value get_status_code() const
Return the response status code.
size_t consume(char const *buf, size_t len)
Process bytes in the input buffer.
Namespace for the WebSocket++ project.