Kea 3.1.1
mt_lease_query_mgr.h
Go to the documentation of this file.
1// Copyright (C) 2022-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 MT_LEASE_QUERY_LISTENER_MGR_H
8#define MT_LEASE_QUERY_LISTENER_MGR_H
9
10#include <asiolink/io_address.h>
11#include <asiolink/io_service.h>
15#include <thread>
16#include <vector>
17
18namespace isc {
19namespace lease_query {
20
32public:
49 const uint16_t port,
50 const uint16_t family,
51 const tcp::TcpListener::IdleTimeout& idle_timeout,
52 const uint16_t thread_pool_size = 1,
54 tcp::TcpConnectionFilterCallback connection_filter = 0,
55 const size_t max_concurrent_queries = 0);
56
59
71 const asiolink::IOAddress& server_address,
72 const unsigned short server_port,
73 const asiolink::TlsContextPtr& tls_context,
74 const tcp::TcpListener::IdleTimeout& idle_timeout,
75 const tcp::TcpConnectionFilterCallback& connection_filter);
76private:
78 uint16_t family_;
79
81 size_t max_concurrent_queries_;
82};
83
85typedef boost::shared_ptr<MtLeaseQueryListenerMgr> MtLeaseQueryListenerMgrPtr;
86
87} // namespace isc::lease_query
88} // namespace isc
89
90#endif // MT_LEASE_QUERY_LISTENER_MGR_H
tcp::TcpListenerPtr listenerFactory(const asiolink::IOServicePtr &io_service, const asiolink::IOAddress &server_address, const unsigned short server_port, const asiolink::TlsContextPtr &tls_context, const tcp::TcpListener::IdleTimeout &idle_timeout, const tcp::TcpConnectionFilterCallback &connection_filter)
Defines a factory function for creating listeners.
MtLeaseQueryListenerMgr(const asiolink::IOAddress &address, const uint16_t port, const uint16_t family, const tcp::TcpListener::IdleTimeout &idle_timeout, const uint16_t thread_pool_size=1, asiolink::TlsContextPtr context=asiolink::TlsContextPtr(), tcp::TcpConnectionFilterCallback connection_filter=0, const size_t max_concurrent_queries=0)
Constructor.
Manages a thread-pool that is used to drive a TcpListener.
boost::shared_ptr< MtLeaseQueryListenerMgr > MtLeaseQueryListenerMgrPtr
Defines a shared pointer to MtLeaseQueryListenerMgr.
std::function< bool(const boost::asio::ip::tcp::endpoint &)> TcpConnectionFilterCallback
Type of the callback for filtering new connections by ip address.
boost::shared_ptr< TcpListener > TcpListenerPtr
Pointer to a TcpListener.
Defines the logger used by the top-level component of kea-lfc.
Idle connection timeout.