Kea 2.7.5
io_service_mgr.h
Go to the documentation of this file.
1// Copyright (C) 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#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
65 void pollIOServices();
66
67private:
68
70 IOServiceMgr() = default;
71
73 ~IOServiceMgr() = default;
74
76 std::list<IOServicePtr> io_services_;
77};
78
79} // namespace asiolink
80} // namespace isc
81
82#endif // IO_SERVICE_MGR_H
Defines the logger used by the top-level component of kea-lfc.