Kea 3.3.3
mt_lease_query_mgr.h
Go to the documentation of this file.
1// Copyright (C) 2022-2026 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
16#include <thread>
17#include <vector>
18
19namespace isc {
20namespace lease_query {
21
33public:
50 const uint16_t port,
51 const uint16_t family,
52 const tcp::TcpListener::IdleTimeout& idle_timeout,
53 const uint16_t thread_pool_size = 1,
55 tcp::TcpConnectionFilterCallback connection_filter = 0,
56 const size_t max_concurrent_queries = 0);
57
60
72 const asiolink::IOAddress& server_address,
73 const unsigned short server_port,
74 const asiolink::TlsContextPtr& tls_context,
75 const tcp::TcpListener::IdleTimeout& idle_timeout,
76 const tcp::TcpConnectionFilterCallback& connection_filter);
77private:
79 uint16_t family_;
80
82 size_t max_concurrent_queries_;
83};
84
86typedef boost::shared_ptr<MtLeaseQueryListenerMgr> MtLeaseQueryListenerMgrPtr;
87
88} // namespace isc::lease_query
89} // namespace isc
90
91#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.