Kea 3.1.1
io_service_mgr.h
Go to the documentation of this file.
1// Copyright (C) 2024-2025 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#ifndef IO_SERVICE_MGR_H
8#define IO_SERVICE_MGR_H
9
10#include <asiolink/io_service.h>
11
12#include <boost/noncopyable.hpp>
13
14namespace isc {
15namespace asiolink {
16
17class IOServiceMgr;
18
27class IOServiceMgr : boost::noncopyable {
28public:
29
33 static IOServiceMgr& instance();
34
42 void registerIOService(IOServicePtr io_service);
43
50 void unregisterIOService(IOServicePtr io_service);
51
54 io_services_.clear();
55 }
56
59 // @return The count of IOService objects.
61 return (io_services_.size());
62 }
63
67 size_t pollIOServices();
68
69private:
70
72 IOServiceMgr() = default;
73
75 ~IOServiceMgr() = default;
76
78 std::list<IOServicePtr> io_services_;
79};
80
81} // namespace asiolink
82} // namespace isc
83
84#endif // IO_SERVICE_MGR_H
Defines the logger used by the top-level component of kea-lfc.