WebSocket++
0.8.1
C++ websocket client/server library
|
28 #ifndef HTTP_PARSER_RESPONSE_HPP
29 #define HTTP_PARSER_RESPONSE_HPP
34 #include <websocketpp/http/parser.hpp>
60 typedef lib::shared_ptr<type> ptr;
64 , m_buf(lib::make_shared<std::string>())
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;
186 #include <websocketpp/http/impl/response.hpp>
const std::string & get_status_msg() const
Return the response status message.
bool ready() const
Returns true if the response is ready.
void set_status(status_code::value code, std::string const &msg)
Set response status code and message.
status_code::value get_status_code() const
Return the response status code.
static std::vector< int > const versions_supported(helper, helper+4)
Container that stores the list of protocol versions supported.
size_t consume(std::istream &s)
Process bytes in the input buffer (istream version)
std::string raw() const
Returns the full raw response.
void set_status(status_code::value code)
Set response status code and message.
size_t consume(char const *buf, size_t len)
Process bytes in the input buffer.
bool headers_ready() const
Returns true if the response headers are fully parsed.
Stores, parses, and manipulates HTTP responses.