10 #include "HelloService.hpp"
11 #include <pion/net/HTTPResponseWriter.hpp>
14 using namespace pion::net;
23 void HelloService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
25 static const std::string HELLO_HTML =
"<html><body>Hello World!</body></html>";
28 writer->writeNoCopy(HELLO_HTML);
29 writer->writeNoCopy(HTTPTypes::STRING_CRLF);
30 writer->writeNoCopy(HTTPTypes::STRING_CRLF);
static boost::shared_ptr< HTTPResponseWriter > create(TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler=FinishedHandler())