UNSocketProtocol.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 
17 #ifndef HH_SENF_Socket_Protocols_UN_UNSocketProtocol_
18 #define HH_SENF_Socket_Protocols_UN_UNSocketProtocol_ 1
19 
20 // Custom includes
22 
23 //#include "UNSocketProtocol.mpp"
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 
26 namespace senf {
27 
29  //\{
30 
37  : public virtual SocketProtocol
38  {
39  public:
40  virtual void close();
41  //
44  virtual void terminate() const;
45 
52  //\{
54 
55  unsigned available() const;
56  bool eof() const;
57 
58  //\}
59 
60  private:
61  void check_and_unlink() const;
62 
63  std::string path_;
64  };
65 
66 }
67 
68 //-/////////////////////////////////////////////////////////////////////////////////////////////////
69 //#include "UNSocketProtocol.cci"
70 //#include "UNSocketProtocol.ct"
71 //#include "UNSocketProtocol.cti"
72 #endif
73 
74 
75 // Local Variables:
76 // mode: c++
77 // fill-column: 100
78 // comment-column: 40
79 // c-file-style: "senf"
80 // indent-tabs-mode: nil
81 // ispell-local-dictionary: "american"
82 // compile-command: "scons -u test"
83 // End:
virtual void terminate() const
Forcibly close socket.
Socket Protocol base class.
bool eof() const
Check for end-of-file condition.
Protocol facet providing Unix Domain Addressing related API.
SocketProtocol and ConcreteSocketProtocol public header.
unsigned available() const
Return (maximum) number of bytes available for reading without < blocking.
virtual void close()
Close socket.