5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the
17 // Free Software Foundation, Inc.,
18 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 \brief UNDatagramSocketHandle public header */
23 #ifndef HH_UNDatagramSocketHandle_
24 #define HH_UNDatagramSocketHandle_ 1
27 #include "UNAddressing.hh"
28 #include "UNProtocol.hh"
29 #include "../../../Socket/Protocols/BSDSocketProtocol.hh"
30 #include "../../../Socket/FramingPolicy.hh"
31 #include "../../../Socket/CommunicationPolicy.hh"
32 #include "../../../Socket/ReadWritePolicy.hh"
33 #include "../../../Socket/BufferingPolicy.hh"
34 #include "../../../Socket/ProtocolClientSocketHandle.hh"
38 //#include "UNDatagramSocketHandle.mpp"
39 ///////////////////////////////hh.p////////////////////////////////////////
43 /// \addtogroup concrete_protocol_group
46 typedef MakeSocketPolicy<
48 DatagramFramingPolicy,
49 UnconnectedCommunicationPolicy,
53 >::policy UNDatagramSocket_Policy; ///< Socket Policy of the Unix Domain Datagram Protocol
55 /** \brief Unix Domain Datagram Socket Protocol
57 \par Socket Handle typedefs:
58 \ref UNDatagramSocketHandle (ProtocolClientSocketHandle)
60 \par Policy Interface: (to be checked)
61 ClientSocketHandle::read(), ClientSocketHandle::readfrom(),
62 ClientSocketHandle::writeto(), ClientSocketHandle::bind(), ClientSocketHandle::local(),
63 ClientSocketHandle::rcvbuf(), ClientSocketHandle::sndbuf()
68 UNDatagramSocketProtocol provides an datagram protocol socket based on the unix domain addressing.
70 This class is utilized as the protocol class of the ProtocolClientSocketHandle
71 via the Socket Handle typedefs above.
74 class UNDatagramSocketProtocol
75 : public ConcreteSocketProtocol<UNDatagramSocket_Policy>,
77 public BSDSocketProtocol,
78 public AddressableBSDSocketProtocol
81 ///////////////////////////////////////////////////////////////////////////
87 void init_client() const; ///< Create unconnected client socket
88 /**< \note This member is implicitly called from the
89 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
91 void init_client(UNSocketAddress const & address) const;
92 ///< Create client socket and bind
93 /**< Creates a new client socket and bind to the given
95 \param[in] local address to bind to */
96 /**< \note This member is implicitly called from the
97 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
101 ///\name Abstract Interface Implementation
103 std::auto_ptr<SocketProtocol> clone() const;
108 typedef ProtocolClientSocketHandle<UNDatagramSocketProtocol> UNDatagramClientSocketHandle;
110 typedef MakeSocketPolicy<
111 UNDatagramSocket_Policy,
113 >::policy UNDatagramSocket_Policy;
115 ///////////////////////////////hh.e////////////////////////////////////////
116 //#include "UNDatagramSocketHandle.cci"
117 //#include "UNDatagramSocketHandle.ct"
118 //#include "UNDatagramSocketHandle.cti"
125 // comment-column: 40
126 // c-file-style: "senf"
127 // indent-tabs-mode: nil
128 // ispell-local-dictionary: "american"
129 // compile-command: "scons -u test"