Kea 2.7.0
tls_acceptor.h
Go to the documentation of this file.
1// Copyright (C) 2016-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 TLS_ACCEPTOR_H
8#define TLS_ACCEPTOR_H
9
10#ifndef BOOST_ASIO_HPP
11#error "asio.hpp must be included before including this, see asiolink.h as to why"
12#endif
13
15#include <asiolink/io_service.h>
16#include <asiolink/io_socket.h>
19#include <asiolink/tcp_socket.h>
20#include <asiolink/tls_socket.h>
21#include <boost/shared_ptr.hpp>
22#include <netinet/in.h>
23
24namespace isc {
25namespace asiolink {
26
30template<typename C>
31class TLSAcceptor : public TCPAcceptor<C> {
32public:
33
37 explicit TLSAcceptor(const IOServicePtr& io_service) : TCPAcceptor<C>(io_service) {
38 }
39
41 virtual ~TLSAcceptor() {
42 }
43
54 template<typename SocketCallback>
55 void asyncAccept(const TLSSocket<SocketCallback>& socket, C& callback) {
56 TCPAcceptor<C>::acceptor_->async_accept(socket.getASIOSocket(), callback);
57 }
58};
59
60} // namespace asiolink
61} // namespace isc
62
63#endif
Defines the logger used by the top-level component of kea-lfc.