Kea
1.5.0
connection_pool.cc
Go to the documentation of this file.
1
// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC")
2
//
3
// This Source Code Form is subject to the terms of the Mozilla Public
4
// License, v. 2.0. If a copy of the MPL was not distributed with this
5
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
#include <config.h>
8
9
#include <
asiolink/asio_wrapper.h
>
10
#include <
http/connection_pool.h
>
11
12
namespace
isc
{
13
namespace
http {
14
15
void
16
HttpConnectionPool::start
(
const
HttpConnectionPtr
& connection) {
17
connections_
.insert(
connections_
.end(), connection);
18
connection->asyncAccept();
19
}
20
21
void
22
HttpConnectionPool::stop
(
const
HttpConnectionPtr
& connection) {
23
connections_
.remove(connection);
24
connection->close();
25
}
26
27
void
28
HttpConnectionPool::stopAll
() {
29
for
(
auto
connection =
connections_
.begin();
30
connection !=
connections_
.end();
31
++connection) {
32
(*connection)->close();
33
}
34
connections_
.clear();
35
}
36
37
}
38
}
isc::http::HttpConnectionPool::stop
void stop(const HttpConnectionPtr &connection)
Stops a connection and removes it from the pool.
Definition:
connection_pool.cc:22
isc::http::HttpConnectionPool::start
void start(const HttpConnectionPtr &connection)
Start new connection.
Definition:
connection_pool.cc:16
connection_pool.h
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition:
agent_parser.cc:144
isc::http::HttpConnectionPool::connections_
std::list< HttpConnectionPtr > connections_
Set of connections.
Definition:
connection_pool.h:52
isc::http::HttpConnectionPool::stopAll
void stopAll()
Stops all connections and removes them from the pool.
Definition:
connection_pool.cc:28
isc::http::HttpConnectionPtr
boost::shared_ptr< HttpConnection > HttpConnectionPtr
Pointer to the HttpConnection.
Definition:
connection.h:38
asio_wrapper.h
src
lib
http
connection_pool.cc
Generated on Fri Jul 10 2020 09:12:51 for Kea by
1.8.18