alaCarte Maps
Renderer for OpenStreetMap tiles
|
#include <http_request.hpp>
Classes | |
struct | Header |
class | Reply |
struct | RequestData |
Public Member Functions | |
HttpRequest (boost::asio::io_service &ioService, const shared_ptr< HttpServer > &server, const shared_ptr< RequestManager > &manager) | |
This file is part of alaCarte. More... | |
TESTABLE const string & | getURL () const |
TESTABLE void | answer (const shared_ptr< Tile > &tile, Reply::StatusType status=Reply::ok) |
TESTABLE void | answer (Reply::StatusType status) |
void | startCollectingData () |
Start the first asynchronous operation for the connection. More... | |
void | close () |
Stop all asynchronous operations associated with the connection. More... | |
boost::asio::ip::tcp::socket & | getSocket () |
Protected Attributes | |
bool | answered |
Reply | reply |
The reply to be sent back to the client. More... | |
RequestData | data |
Private Member Functions | |
void | handleRead (const boost::system::error_code &e, std::size_t bytes_transferred) |
Handle completion of a read operation. More... | |
void | handleWrite (const boost::system::error_code &e) |
Handle completion of a write operation. More... | |
void | answer () |
bool | checkifAnswered () |
void | readSome () |
Private Attributes | |
boost::asio::ip::tcp::socket | socket |
Socket for the connection. More... | |
std::array< char, 8192 > | buffer |
Buffer for incoming data. More... | |
HttpRequestParser | parser |
The parser for the incoming request. More... | |
weak_ptr< RequestManager > | manager |
weak_ptr< HttpServer > | server |
Friends | |
class | HttpRequestParser |
Definition at line 33 of file http_request.hpp.
|
explicit |
This file is part of alaCarte.
alaCarte is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
alaCarte is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with alaCarte. If not, see http://www.gnu.org/licenses/.
Copyright alaCarte 2012-2013 Simon Dreher, Florian Jacob, Tobias Kahlert, Patrick Niklaus, Bernhard Scheirle, Lisa Winter Maintainer: Bernhard Scheirle
Definition at line 31 of file http_request.cpp.
void HttpRequest::answer | ( | const shared_ptr< Tile > & | tile, |
Reply::StatusType | status = Reply::ok |
||
) |
Definition at line 132 of file http_request.cpp.
void HttpRequest::answer | ( | Reply::StatusType | status | ) |
Definition at line 124 of file http_request.cpp.
|
private |
Definition at line 116 of file http_request.cpp.
|
private |
Definition at line 108 of file http_request.cpp.
void HttpRequest::close | ( | ) |
Stop all asynchronous operations associated with the connection.
Definition at line 45 of file http_request.cpp.
boost::asio::ip::tcp::socket & HttpRequest::getSocket | ( | ) |
Definition at line 103 of file http_request.cpp.
const string & HttpRequest::getURL | ( | ) | const |
Definition at line 98 of file http_request.cpp.
|
private |
Handle completion of a read operation.
Definition at line 58 of file http_request.cpp.
|
private |
Handle completion of a write operation.
Definition at line 82 of file http_request.cpp.
|
private |
Definition at line 49 of file http_request.cpp.
void HttpRequest::startCollectingData | ( | ) |
Start the first asynchronous operation for the connection.
Definition at line 40 of file http_request.cpp.
|
friend |
Definition at line 35 of file http_request.hpp.
|
protected |
Definition at line 112 of file http_request.hpp.
|
private |
Buffer for incoming data.
Definition at line 121 of file http_request.hpp.
|
protected |
Definition at line 115 of file http_request.hpp.
|
private |
Definition at line 125 of file http_request.hpp.
|
private |
The parser for the incoming request.
Definition at line 123 of file http_request.hpp.
|
protected |
The reply to be sent back to the client.
Definition at line 114 of file http_request.hpp.
|
private |
Definition at line 126 of file http_request.hpp.
|
private |
Socket for the connection.
Definition at line 119 of file http_request.hpp.