From 1d05994fe1d9488193f01b47e92dcf11920c8f02 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 28 Dec 2010 00:43:12 +0100 Subject: Misc changes in HTTP code. --- http.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'http.h') diff --git a/http.h b/http.h index f7aec59..3ab66dc 100644 --- a/http.h +++ b/http.h @@ -1,6 +1,8 @@ #ifndef HTTP_H #define HTTP_H +#include + #include #include #include @@ -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 -- cgit v1.2.3