Public Member Functions | Private Member Functions | Private Attributes

proxy_connection Class Reference

#include <asio_proxy_connection.hpp>

Collaboration diagram for proxy_connection:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 proxy_connection (tcp::socket &socket, proxy_information pi, ana::address address, ana::port port, ana::timer *timer)
void connect (proxy_connection_manager *manager, ana::connection_handler *handler)

Private Member Functions

std::string * generate_connect_request () const
std::string * generate_base64_credentials () const
void do_connect ()
void handle_connect (const boost::system::error_code &ec, tcp::resolver::iterator endpoint_iterator)
void handle_sent_request (const boost::system::error_code &ec, std::string *request)
void handle_response (boost::asio::streambuf *buf, const boost::system::error_code &, size_t)
bool finds (const std::string &source, char const *pattern)
std::string base64_encode (char const *bytes_to_encode, unsigned int in_len) const

Private Attributes

tcp::socket & socket_
const proxy_information proxy_info_
ana::address address_
ana::port port_
proxy_connection_managermanager_
ana::connection_handlerconn_handler_
bool authenticating_
ana::timertimer_

Detailed Description

Definition at line 69 of file asio_proxy_connection.hpp.


Constructor & Destructor Documentation

proxy_connection::proxy_connection ( tcp::socket &  socket,
proxy_information  pi,
ana::address  address,
ana::port  port,
ana::timer timer 
)

Definition at line 37 of file asio_proxy_connection.cpp.


Member Function Documentation

std::string proxy_connection::base64_encode ( char const *  bytes_to_encode,
unsigned int  in_len 
) const [private]

Definition at line 78 of file asio_proxy_connection.cpp.

Referenced by generate_base64_credentials().

Here is the caller graph for this function:

void proxy_connection::connect ( proxy_connection_manager manager,
ana::connection_handler handler 
)

Definition at line 233 of file asio_proxy_connection.cpp.

References authenticating_, conn_handler_, do_connect(), and manager_.

Referenced by asio_client::connect_through_proxy().

Here is the call graph for this function:

Here is the caller graph for this function:

void proxy_connection::do_connect (  )  [private]

Definition at line 212 of file asio_proxy_connection.cpp.

References conn_handler_, error(), ana::generic_error, handle_connect(), proxy_connection_manager::handle_proxy_connection(), manager_, proxy_information::proxy_address, proxy_info_, proxy_information::proxy_port, socket_, and timer_.

Referenced by connect(), and handle_response().

Here is the call graph for this function:

Here is the caller graph for this function:

bool proxy_connection::finds ( const std::string &  source,
char const *  pattern 
) [private]

Definition at line 123 of file asio_proxy_connection.cpp.

Referenced by handle_response().

Here is the caller graph for this function:

std::string * proxy_connection::generate_base64_credentials (  )  const [private]

Definition at line 64 of file asio_proxy_connection.cpp.

References address_, base64_encode(), proxy_information::password, port_, proxy_info_, and proxy_information::user_name.

Referenced by handle_connect().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string * proxy_connection::generate_connect_request (  )  const [private]

Definition at line 54 of file asio_proxy_connection.cpp.

References address_, and port_.

Referenced by handle_connect().

Here is the caller graph for this function:

void proxy_connection::handle_connect ( const boost::system::error_code &  ec,
tcp::resolver::iterator  endpoint_iterator 
) [private]

Definition at line 178 of file asio_proxy_connection.cpp.

References authenticating_, ana::buffer(), conn_handler_, error(), generate_base64_credentials(), generate_connect_request(), proxy_connection_manager::handle_proxy_connection(), handle_sent_request(), manager_, socket_, and timer_.

Referenced by do_connect().

Here is the call graph for this function:

Here is the caller graph for this function:

void proxy_connection::handle_response ( boost::asio::streambuf *  buf,
const boost::system::error_code &  ec,
size_t   
) [private]

Definition at line 130 of file asio_proxy_connection.cpp.

References authenticating_, conn_handler_, do_connect(), finds(), ana::generic_error, proxy_connection_manager::handle_proxy_connection(), manager_, socket_, and timer_.

Referenced by handle_sent_request().

Here is the call graph for this function:

Here is the caller graph for this function:

void proxy_connection::handle_sent_request ( const boost::system::error_code &  ec,
std::string *  request 
) [private]

Definition at line 165 of file asio_proxy_connection.cpp.

References error(), handle_response(), and socket_.

Referenced by handle_connect().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 110 of file asio_proxy_connection.hpp.

Referenced by connect(), handle_connect(), and handle_response().

Definition at line 108 of file asio_proxy_connection.hpp.

Referenced by connect(), do_connect(), handle_connect(), and handle_response().

Definition at line 107 of file asio_proxy_connection.hpp.

Referenced by connect(), do_connect(), handle_connect(), and handle_response().

Definition at line 102 of file asio_proxy_connection.hpp.

Referenced by do_connect(), and generate_base64_credentials().

tcp::socket& proxy_connection::socket_ [private]

Definition at line 111 of file asio_proxy_connection.hpp.

Referenced by do_connect(), handle_connect(), and handle_response().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:14:56 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs