libtorrent::http_parser Class Reference

#include <http_tracker_connection.hpp>

List of all members.

Public Member Functions

 http_parser ()
template<class 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


Detailed Description

Definition at line 66 of file http_tracker_connection.hpp.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
read_status 
read_header 
read_body 

Definition at line 91 of file http_tracker_connection.hpp.


Constructor & Destructor Documentation

libtorrent::http_parser::http_parser (  ) 

Definition at line 83 of file http_tracker_connection.cpp.


Member Function Documentation

template<class T>
T libtorrent::http_parser::header ( char const *  key  )  const [inline]

std::string const& libtorrent::http_parser::protocol (  )  const [inline]

Definition at line 72 of file http_tracker_connection.hpp.

References m_protocol.

int libtorrent::http_parser::status_code (  )  const [inline]

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

bool libtorrent::http_parser::header_finished (  )  const [inline]

bool libtorrent::http_parser::finished (  )  const [inline]

boost::tuple< int, int > libtorrent::http_parser::incoming ( buffer::const_interval  recv_buffer  ) 

int libtorrent::http_parser::body_start (  )  const [inline]

int libtorrent::http_parser::content_length (  )  const [inline]

Definition at line 80 of file http_tracker_connection.hpp.

References m_content_length.

void libtorrent::http_parser::reset (  ) 


Member Data Documentation

Definition at line 84 of file http_tracker_connection.hpp.

Referenced by get_body(), incoming(), and reset().

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().

Definition at line 87 of file http_tracker_connection.hpp.

Referenced by incoming(), and message().

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]

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().

Definition at line 95 of file http_tracker_connection.hpp.

Referenced by body_start(), get_body(), incoming(), and reset().

Definition at line 97 of file http_tracker_connection.hpp.

Referenced by finished(), incoming(), and reset().


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:21:41 2008 by  doxygen 1.5.6