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 
10 #include <http/connection_pool.h>
11 
12 namespace isc {
13 namespace http {
14 
15 void
17  connections_.insert(connections_.end(), connection);
18  connection->asyncAccept();
19 }
20 
21 void
23  connections_.remove(connection);
24  connection->close();
25 }
26 
27 void
29  for (auto connection = connections_.begin();
30  connection != connections_.end();
31  ++connection) {
32  (*connection)->close();
33  }
34  connections_.clear();
35 }
36 
37 }
38 }
void start(const HttpConnectionPtr &connection)
Start new connection.
std::list< HttpConnectionPtr > connections_
Set of connections.
void stop(const HttpConnectionPtr &connection)
Stops a connection and removes it from the pool.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void stopAll()
Stops all connections and removes them from the pool.
boost::shared_ptr< HttpConnection > HttpConnectionPtr
Pointer to the HttpConnection.
Definition: connection.h:38