ProtocolServerSocketHandle.hh
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 
18 #ifndef HH_SENF_Socket_ProtocolServerSocketHandle_
19 #define HH_SENF_Socket_ProtocolServerSocketHandle_ 1
20 
21 // Custom includes
22 #include "ServerSocketHandle.hh"
23 #include <senf/config.hh>
24 #include <senf/Utils/Tags.hh>
25 
27 //-/////////////////////////////////////////////////////////////////////////////////////////////////
28 
29 namespace senf {
30 
32  //\{
33 
34  template <class Protocol> class ProtocolClientSocketHandle;
35 
56  template <class SocketProtocol>
57  class ProtocolServerSocketHandle
58  : public ServerSocketHandle<typename SocketProtocol::Policy>
59  {
60  public:
61  //-////////////////////////////////////////////////////////////////////////
62  // Types
63 
65 
66  //-////////////////////////////////////////////////////////////////////////
68  //\{
69 
81 
82 # define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 9, SENF_ABSOLUTE_INCLUDE_PATH(Socket/ProtocolServerSocketHandle.mpp), 1))
83 # include BOOST_PP_ITERATE()
84 
95  //\}
96  //-////////////////////////////////////////////////////////////////////////
97 
98  Protocol & protocol();
99 
104  ProtocolClientSocketHandle<SocketProtocol> accept();
105 
108 
109  void state(SocketStateMap & map, unsigned lod=0);
110  std::string dumpState(unsigned lod=0);
111 
112  protected:
113  ProtocolServerSocketHandle(FileHandle other, bool isChecked);
114 
115  private:
116 
117  };
118 
119  //\}
120 }
121 
122 //-/////////////////////////////////////////////////////////////////////////////////////////////////
123 //#include "ProtocolServerSocketHandle.cci"
124 //#include "ProtocolServerSocketHandle.ct"
126 #endif
127 
128 
129 // Local Variables:
130 // mode: c++
131 // fill-column: 100
132 // c-file-style: "senf"
133 // indent-tabs-mode: nil
134 // ispell-local-dictionary: "american"
135 // compile-command: "scons -u test"
136 // comment-column: 40
137 // End:
Socket Protocol base class.
NoInit_t
ServerSocketHandle public header.
void state(SocketStateMap &map, unsigned lod=0)
Protocol & protocol()
Access the protocol interface.
ProtocolServerSocketHandle()
Create new server socket.
ProtocolClientSocketHandle< SocketProtocol > accept()
SocketProtocol Protocol
The socket protocol.
static ProtocolServerSocketHandle cast_static(FileHandle handle)
static ProtocolServerSocketHandle cast_dynamic(FileHandle handle)
std::string dumpState(unsigned lod=0)