#ifndef HTTP_CONNECTION_H #define HTTP_CONNECTION_H #include #include using boost::asio::ip::tcp; namespace HTTP { class Connection : public boost::enable_shared_from_this { friend class Server; private: Connection(boost::asio::io_service& io_service); void handle_write(const boost::system::error_code& error, size_t bytes_transferred); void handle_read(const boost::system::error_code& error, size_t bytes_transferred); tcp::socket socket; boost::asio::streambuf buf; public: typedef boost::shared_ptr p; void start(); }; }; #endif