#include <http_tracker_connection.hpp>
Public Member Functions | |
| http_parser () | |
| template<class T> | |
| T | header (char const *key) const |
| std::string const & | protocol () const |
| int | status_code () const |
| std::string | message () const |
| buffer::const_interval | get_body () const |
| bool | header_finished () const |
| bool | finished () const |
| boost::tuple< int, int > | incoming (buffer::const_interval recv_buffer) |
| int | body_start () const |
| int | content_length () const |
| void | reset () |
Private Types | |
| enum | { read_status, read_header, read_body } |
Private Attributes | |
| int | m_recv_pos |
| int | m_status_code |
| std::string | m_protocol |
| std::string | m_server_message |
| int | m_content_length |
| enum libtorrent::http_parser:: { ... } | m_state |
| std::map< std::string, std::string > | m_header |
| buffer::const_interval | m_recv_buffer |
| int | m_body_start_pos |
| bool | m_finished |
Definition at line 66 of file http_tracker_connection.hpp.
anonymous enum [private] |
Definition at line 91 of file http_tracker_connection.hpp.
| libtorrent::http_parser::http_parser | ( | ) |
Definition at line 83 of file http_tracker_connection.cpp.
| T libtorrent::http_parser::header | ( | char const * | key | ) | const [inline] |
Definition at line 101 of file http_tracker_connection.hpp.
References m_header.
Referenced by libtorrent::web_peer_connection::on_receive(), libtorrent::http_tracker_connection::on_response(), and libtorrent::http_tracker_connection::receive().
| std::string const& libtorrent::http_parser::protocol | ( | ) | const [inline] |
| int libtorrent::http_parser::status_code | ( | ) | const [inline] |
Definition at line 73 of file http_tracker_connection.hpp.
References m_status_code.
Referenced by libtorrent::web_peer_connection::on_receive(), libtorrent::http_tracker_connection::on_response(), libtorrent::http_tracker_connection::parse(), and libtorrent::http_tracker_connection::receive().
| std::string libtorrent::http_parser::message | ( | ) | const [inline] |
Definition at line 74 of file http_tracker_connection.hpp.
References m_server_message.
Referenced by libtorrent::web_peer_connection::on_receive().
| buffer::const_interval libtorrent::http_parser::get_body | ( | ) | const |
Definition at line 222 of file http_tracker_connection.cpp.
References libtorrent::buffer::const_interval::begin, m_body_start_pos, m_content_length, m_recv_buffer, m_recv_pos, m_state, and read_body.
Referenced by libtorrent::web_peer_connection::downloading_piece_progress(), and libtorrent::web_peer_connection::on_receive().
| bool libtorrent::http_parser::header_finished | ( | ) | const [inline] |
Definition at line 76 of file http_tracker_connection.hpp.
References m_state, and read_body.
Referenced by libtorrent::web_peer_connection::downloading_piece_progress(), libtorrent::web_peer_connection::on_receive(), libtorrent::http_tracker_connection::on_response(), and libtorrent::http_tracker_connection::receive().
| bool libtorrent::http_parser::finished | ( | ) | const [inline] |
Definition at line 77 of file http_tracker_connection.hpp.
References m_finished.
Referenced by libtorrent::web_peer_connection::on_receive(), and libtorrent::http_tracker_connection::receive().
| boost::tuple< int, int > libtorrent::http_parser::incoming | ( | buffer::const_interval | recv_buffer | ) |
Definition at line 93 of file http_tracker_connection.cpp.
References libtorrent::buffer::const_interval::begin, libtorrent::dht::distance(), libtorrent::buffer::const_interval::end, libtorrent::buffer::const_interval::left(), m_body_start_pos, m_content_length, m_finished, m_header, m_protocol, m_recv_buffer, m_recv_pos, m_server_message, m_state, m_status_code, pos(), read_body, read_header, read_status, and to_lower().
Referenced by libtorrent::web_peer_connection::on_receive(), and libtorrent::http_tracker_connection::receive().
| int libtorrent::http_parser::body_start | ( | ) | const [inline] |
Definition at line 79 of file http_tracker_connection.hpp.
References m_body_start_pos.
Referenced by libtorrent::web_peer_connection::on_receive(), and libtorrent::http_tracker_connection::on_response().
| int libtorrent::http_parser::content_length | ( | ) | const [inline] |
| void libtorrent::http_parser::reset | ( | ) |
Definition at line 234 of file http_tracker_connection.cpp.
References libtorrent::buffer::const_interval::begin, libtorrent::buffer::const_interval::end, m_body_start_pos, m_content_length, m_finished, m_header, m_recv_buffer, m_recv_pos, m_state, m_status_code, and read_status.
Referenced by libtorrent::web_peer_connection::on_receive().
int libtorrent::http_parser::m_recv_pos [private] |
Definition at line 84 of file http_tracker_connection.hpp.
Referenced by get_body(), incoming(), and reset().
int libtorrent::http_parser::m_status_code [private] |
Definition at line 85 of file http_tracker_connection.hpp.
Referenced by incoming(), reset(), and status_code().
std::string libtorrent::http_parser::m_protocol [private] |
Definition at line 86 of file http_tracker_connection.hpp.
Referenced by incoming(), and protocol().
std::string libtorrent::http_parser::m_server_message [private] |
int libtorrent::http_parser::m_content_length [private] |
Definition at line 89 of file http_tracker_connection.hpp.
Referenced by content_length(), get_body(), incoming(), and reset().
enum { ... } libtorrent::http_parser::m_state [private] |
Referenced by get_body(), header_finished(), incoming(), and reset().
std::map<std::string, std::string> libtorrent::http_parser::m_header [private] |
Definition at line 93 of file http_tracker_connection.hpp.
Referenced by header(), incoming(), and reset().
Definition at line 94 of file http_tracker_connection.hpp.
Referenced by get_body(), incoming(), and reset().
int libtorrent::http_parser::m_body_start_pos [private] |
Definition at line 95 of file http_tracker_connection.hpp.
Referenced by body_start(), get_body(), incoming(), and reset().
bool libtorrent::http_parser::m_finished [private] |
Definition at line 97 of file http_tracker_connection.hpp.
Referenced by finished(), incoming(), and reset().
1.5.6