#include <asio_proxy_connection.hpp>

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_manager * | manager_ |
| ana::connection_handler * | conn_handler_ |
| bool | authenticating_ |
| ana::timer * | timer_ |
Definition at line 69 of file asio_proxy_connection.hpp.
| 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.
| 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().

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


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


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

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


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

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


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


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


ana::address proxy_connection::address_ [private] |
Definition at line 104 of file asio_proxy_connection.hpp.
Referenced by generate_base64_credentials(), and generate_connect_request().
bool proxy_connection::authenticating_ [private] |
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().
ana::port proxy_connection::port_ [private] |
Definition at line 105 of file asio_proxy_connection.hpp.
Referenced by generate_base64_credentials(), and generate_connect_request().
const proxy_information proxy_connection::proxy_info_ [private] |
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 100 of file asio_proxy_connection.hpp.
Referenced by do_connect(), handle_connect(), handle_response(), and handle_sent_request().
ana::timer* proxy_connection::timer_ [private] |
Definition at line 111 of file asio_proxy_connection.hpp.
Referenced by do_connect(), handle_connect(), and handle_response().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:14:56 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |