Kea  1.9.9-git
io_socket.cc
Go to the documentation of this file.
1 // Copyright (C) 2010-2016 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 #include <config.h>
9 #include <asiolink/io_socket.h>
10 
11 namespace isc {
12 namespace asiolink {
13 
20 class DummySocket : public IOSocket {
21 private:
22  DummySocket(const DummySocket& source);
23  DummySocket& operator=(const DummySocket& source);
24 public:
31  DummySocket(const int protocol) : protocol_(protocol) {}
32 
37  virtual int getNative() const { return (-1); }
38 
39  virtual int getProtocol() const { return (protocol_); }
40 private:
41  const int protocol_;
42 };
43 
44 IOSocket&
46  static DummySocket socket(IPPROTO_UDP);
47  return (socket);
48 }
49 
50 IOSocket&
52  static DummySocket socket(IPPROTO_TCP);
53  return (socket);
54 }
55 
56 } // namespace asiolink
57 } // namespace isc
Defines the logger used by the top-level component of kea-dhcp-ddns.