]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/asio/example/cpp11/http/server/connection_manager.cpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / libs / asio / example / cpp11 / http / server / connection_manager.cpp
CommitLineData
7c673cae
FG
1//
2// connection_manager.cpp
3// ~~~~~~~~~~~~~~~~~~~~~~
4//
f67539c2 5// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7c673cae
FG
6//
7// Distributed under the Boost Software License, Version 1.0. (See accompanying
8// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9//
10
11#include "connection_manager.hpp"
12
13namespace http {
14namespace server {
15
16connection_manager::connection_manager()
17{
18}
19
20void connection_manager::start(connection_ptr c)
21{
22 connections_.insert(c);
23 c->start();
24}
25
26void connection_manager::stop(connection_ptr c)
27{
28 connections_.erase(c);
29 c->stop();
30}
31
32void connection_manager::stop_all()
33{
34 for (auto c: connections_)
35 c->stop();
36 connections_.clear();
37}
38
39} // namespace server
40} // namespace http