Kea 2.7.6
io_socket.h
Go to the documentation of this file.
1// Copyright (C) 2010-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_SOCKET_H
8#define IO_SOCKET_H 1
9
10// IMPORTANT NOTE: only very few ASIO headers files can be included in
11// this file. In particular, asio.hpp should never be included here.
12// See the description of the namespace below.
13#include <unistd.h> // for some network system calls
14
15#include <functional>
16#include <string>
17
19
20namespace isc {
21namespace asiolink {
22
37class IOSocket {
38public:
39
41
42
44 typedef boost::asio::socket_base::reuse_address ReuseAddress;
45
47
53
54private:
55 IOSocket(const IOSocket& source);
56 IOSocket& operator=(const IOSocket& source);
57protected:
63public:
65 virtual ~IOSocket() {}
67
88 virtual int getNative() const = 0;
89
99 virtual int getProtocol() const = 0;
100
114 static IOSocket& getDummyUDPSocket();
115
122 static IOSocket& getDummyTCPSocket();
123};
124
125} // namespace asiolink
126} // namespace isc
127
128#endif // IO_SOCKET_H
Defines the logger used by the top-level component of kea-lfc.