ProtocolClientSocketHandle.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_ProtocolClientSocketHandle_
19 #define HH_SENF_Socket_ProtocolClientSocketHandle_ 1
20 
21 // Custom includes
22 #include "ClientSocketHandle.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 ProtocolServerSocketHandle;
35 
52  template <class SocketProtocol>
54  : public ClientSocketHandle<typename SocketProtocol::Policy>
55  {
56  public:
57  //-////////////////////////////////////////////////////////////////////////
58  // Types
59 
61 
62  //-////////////////////////////////////////////////////////////////////////
64  //\{
65 
76 
77 # define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 9, SENF_ABSOLUTE_INCLUDE_PATH(Socket/ProtocolClientSocketHandle.mpp), 1))
78 # include BOOST_PP_ITERATE()
79 
89 
90  //\}
91  //-////////////////////////////////////////////////////////////////////////
92 
93  Protocol & protocol();
94 
98  Protocol const & protocol() const;
99 
102 
103  void state(SocketStateMap & map, unsigned lod=0);
104  std::string dumpState(unsigned lod=0);
105 
106  protected:
107  ProtocolClientSocketHandle(FileHandle other, bool isChecked);
108 
109  private:
110  friend class ProtocolServerSocketHandle<Protocol>;
111  };
112 
113  //\}
114 }
115 
116 //-/////////////////////////////////////////////////////////////////////////////////////////////////
117 //#include "ProtocolClientSocketHandle.cci"
118 //#include "ProtocolClientSocketHandle.ct"
121 #endif
122 
123 
124 // Local Variables:
125 // mode: c++
126 // fill-column: 100
127 // c-file-style: "senf"
128 // indent-tabs-mode: nil
129 // ispell-local-dictionary: "american"
130 // compile-command: "scons -u test"
131 // comment-column: 40
132 // End:
ClientSocketHandle public header.
Protocol & protocol()
Access the protocol interface.
Generic SocketHandle with client interface.
Socket Protocol base class.
std::string dumpState(unsigned lod=0)
NoInit_t
Protocol specific socket handle (server interface)
void state(SocketStateMap &map, unsigned lod=0)
static ProtocolClientSocketHandle cast_static(FileHandle handle)
static ProtocolClientSocketHandle cast_dynamic(FileHandle handle)
Protocol specific socket handle (client interface)
ProtocolClientSocketHandle()
Create new client socket.
SocketProtocol Protocol
The sockets protocol.