diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-12-28 00:43:12 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-12-28 00:43:12 +0100 |
commit | 1d05994fe1d9488193f01b47e92dcf11920c8f02 (patch) | |
tree | f4040712f6914b78004895ae6192cf2162ea0804 /http.h | |
parent | 1a8f351248c38445189a397035e8a2cb3182ea6a (diff) |
Misc changes in HTTP code.
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -1,6 +1,8 @@ #ifndef HTTP_H #define HTTP_H +#include <boost/asio.hpp> + #include <iostream> #include <string> #include <map> @@ -15,13 +17,18 @@ class HTTPRequest { }; class HTTPResponse { - public: + private: HTTPHeaders headers; + boost::asio::ip::tcp::socket& socket; + void write_headers(); + bool headers_written; + public: int code; std::string httpver, status; - HTTPResponse(); + HTTPResponse(boost::asio::ip::tcp::socket& socket_); void add_header(std::string key, std::string value); - void write_headers(std::ostream& os); + void write(char *data, unsigned int len); + void write(std::string str); }; #endif |