SocketProtocol.cci
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
14 /** \file
15  \brief SocketProtocol and ConcreteSocketProtocol inline non-template implementation
16  */
17 
18 //#include "SocketProtocol.ih"
19 
20 // Custom includes
21 #include <senf/Utils/senfassert.hh>
22 
23 #define prefix_ inline
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 
26 //-/////////////////////////////////////////////////////////////////////////////////////////////////
27 // senf::SocketProtocol
28 
29 prefix_ senf::FileHandle senf::SocketProtocol::fh()
30  const
31 {
32  return body().handle();
33 }
34 
35 prefix_ int senf::SocketProtocol::fd()
36  const
37 {
38  return body().fd();
39 }
40 
41 prefix_ void senf::SocketProtocol::fd(int fd)
42  const
43 {
44  SENF_ASSERT(! body().valid(), "Replacing filedescriptor of open FileHandle");
45  body().fd(fd);
46 }
47 
48 prefix_ senf::SocketProtocol::SocketProtocol()
49 {}
50 
51 prefix_ senf::SocketProtocol::~SocketProtocol()
52 {}
53 
54 //-/////////////////////////////////////////////////////////////////////////////////////////////////
55 #undef prefix_
56 
57 
58 // Local Variables:
59 // mode: c++
60 // fill-column: 100
61 // c-file-style: "senf"
62 // indent-tabs-mode: nil
63 // ispell-local-dictionary: "american"
64 // compile-command: "scons -u test"
65 // comment-column: 40
66 // End: