#include <HTTPResponseWriter.hpp>
Inherits pion::net::HTTPWriter, and enable_shared_from_this< HTTPResponseWriter >.
|
typedef boost::function1< void, const boost::system::error_code & > | FinishedHandler |
| function called after the HTTP message has been sent
|
|
typedef boost::function2< void, const boost::system::error_code &, std::size_t > | WriteHandler |
| data type for a function that handles write operations
|
|
HTTPResponseWriter: used to asynchronously send HTTP responses
Definition at line 30 of file HTTPResponseWriter.hpp.
pion::net::HTTPResponseWriter::HTTPResponseWriter |
( |
TCPConnectionPtr & |
tcp_conn, |
|
|
HTTPResponsePtr & |
http_response, |
|
|
FinishedHandler |
handler |
|
) |
| |
|
inlineprotected |
protected constructor restricts creation of objects (use create())
- Parameters
-
tcp_conn | TCP connection used to send the response |
http_response | pointer to the response that will be sent |
handler | function called after the request has been sent |
Definition at line 86 of file HTTPResponseWriter.hpp.
pion::net::HTTPResponseWriter::HTTPResponseWriter |
( |
TCPConnectionPtr & |
tcp_conn, |
|
|
const HTTPRequest & |
http_request, |
|
|
FinishedHandler |
handler |
|
) |
| |
|
inlineprotected |
protected constructor restricts creation of objects (use create())
- Parameters
-
tcp_conn | TCP connection used to send the response |
http_request | the request we are responding to |
handler | function called after the request has been sent |
Definition at line 110 of file HTTPResponseWriter.hpp.
creates new HTTPResponseWriter objects
- Parameters
-
tcp_conn | TCP connection used to send the response |
http_response | pointer to the response that will be sent |
handler | function called after the response has been sent |
- Returns
- boost::shared_ptr<HTTPResponseWriter> shared pointer to the new writer object that was created
Definition at line 49 of file HTTPResponseWriter.hpp.
Referenced by pion::net::HTTPServer::handleBadRequest(), pion::net::HTTPServer::handleForbiddenRequest(), pion::net::HTTPServer::handleMethodNotAllowed(), pion::net::HTTPServer::handleNotFoundRequest(), pion::net::HTTPCookieAuth::handleOk(), pion::net::HTTPCookieAuth::handleRedirection(), pion::net::HTTPServer::handleServerError(), pion::net::HTTPBasicAuth::handleUnauthorized(), pion::net::HTTPCookieAuth::handleUnauthorized(), pion::plugins::AllowNothingService::operator()(), pion::plugins::CookieService::operator()(), pion::plugins::EchoService::operator()(), and pion::plugins::HelloService::operator()().
creates new HTTPResponseWriter objects
- Parameters
-
tcp_conn | TCP connection used to send the response |
http_request | the request we are responding to |
handler | function called after the request has been sent |
- Returns
- boost::shared_ptr<HTTPResponseWriter> shared pointer to the new writer object that was created
Definition at line 66 of file HTTPResponseWriter.hpp.
virtual void pion::net::HTTPResponseWriter::handleWrite |
( |
const boost::system::error_code & |
write_error, |
|
|
std::size_t |
bytes_written |
|
) |
| |
|
inlineprotectedvirtual |
The documentation for this class was generated from the following file: