To use the asynchronous library synchronously, objects of this type lock a mutex until enough calls have been made to the associated handler. More...
#include <network_manager_ana.hpp>


Public Member Functions | |
| ana_connect_handler () | |
| Constructs a connection handler. | |
| ~ana_connect_handler () | |
| Destructor. | |
| const ana::error_code & | error () const |
| Checks if an error occurred during the connection procedure. | |
| void | wait_completion () |
| Locks current thread until the connection attempt has finished. | |
Private Member Functions | |
| virtual void | handle_connect (ana::error_code error_code, ana::net_id) |
| Handle new connection event. | |
Private Attributes | |
| boost::mutex | mutex_ |
| ana::error_code | error_code_ |
To use the asynchronous library synchronously, objects of this type lock a mutex until enough calls have been made to the associated handler.
Definition at line 336 of file network_manager_ana.hpp.
| ana_connect_handler::ana_connect_handler | ( | ) |
Constructs a connection handler.
| timer | : A pointer to a running timer dealing with the timeout of this connect operation. |
Definition at line 329 of file network_manager_ana.cpp.
References mutex_.
| ana_connect_handler::~ana_connect_handler | ( | ) |
| const ana::error_code & ana_connect_handler::error | ( | ) | const |
Checks if an error occurred during the connection procedure.
Definition at line 342 of file network_manager_ana.cpp.
References error_code_.
Referenced by ana_network_manager::create_client_and_connect().

| void ana_connect_handler::handle_connect | ( | ana::error_code | , | |
| ana::net_id | ||||
| ) | [private, virtual] |
Handle new connection event.
| error_code | : Error code of the event. | |
| net_id | : ID of the client that connects. |
Implements ana::connection_handler.
Definition at line 347 of file network_manager_ana.cpp.
References error_code_, and mutex_.
| void ana_connect_handler::wait_completion | ( | ) |
Locks current thread until the connection attempt has finished.
Definition at line 353 of file network_manager_ana.cpp.
References mutex_.
Referenced by ana_network_manager::create_client_and_connect().

Definition at line 364 of file network_manager_ana.hpp.
Referenced by error(), and handle_connect().
boost::mutex ana_connect_handler::mutex_ [private] |
Definition at line 363 of file network_manager_ana.hpp.
Referenced by ana_connect_handler(), handle_connect(), wait_completion(), and ~ana_connect_handler().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:12:41 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |