Kea 2.5.9
io_service_mgr.cc
Go to the documentation of this file.
1// Copyright (C) 2011-2024 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
11namespace isc {
12namespace asiolink {
13
16 return (instance);
17}
18
19void
21 if (!io_service) {
22 return;
23 }
24 auto it = std::find(io_services_.begin(), io_services_.end(), io_service);
25 if (it == io_services_.end()) {
26 io_services_.push_back(io_service);
27 }
28}
29
30void
32 auto it = std::find(io_services_.begin(), io_services_.end(), io_service);
33 if (it != io_services_.end()) {
34 io_services_.erase(it);
35 }
36}
37
38void
40 for (auto& io_service : io_services_) {
41 io_service->poll();
42 }
43}
44
45} // namespace asiolink
46} // namespace isc
Defines the logger used by the top-level component of kea-lfc.