Examples |
Collaboration diagram for http::server::connection_manager:
Definition at line 22 of file connection_manager.hpp.
Public Member Functions | |
void | start (connection_ptr c) |
Add the specified connection to the manager and start it. | |
void | stop (connection_ptr c) |
Stop the specified connection. | |
void | stop_all () |
Stop all connections. | |
Private Attributes | |
std::set< connection_ptr > | connections_ |
The managed connections. |
void http::server::connection_manager::start | ( | connection_ptr | c | ) |
Add the specified connection to the manager and start it.
Definition at line 18 of file connection_manager.cpp.
Referenced by http::server::server::handle_accept().
00019 { 00020 connections_.insert(c); 00021 c->start(); 00022 }
void http::server::connection_manager::stop | ( | connection_ptr | c | ) |
Stop the specified connection.
Definition at line 24 of file connection_manager.cpp.
Referenced by http::server::connection::handle_read(), and http::server::connection::handle_write().
00025 { 00026 connections_.erase(c); 00027 c->stop(); 00028 }
void http::server::connection_manager::stop_all | ( | ) |
Stop all connections.
Definition at line 30 of file connection_manager.cpp.
Referenced by http::server::server::handle_stop().
00031 { 00032 std::for_each(connections_.begin(), connections_.end(), 00033 boost::bind(&connection::stop, _1)); 00034 connections_.clear(); 00035 }
std::set<connection_ptr> http::server::connection_manager::connections_ [private] |
The managed connections.
Definition at line 37 of file connection_manager.hpp.
Referenced by start(), stop(), and stop_all().