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;
55 class UNDatagramSocketProtocol
56 : public ConcreteSocketProtocol<UNDatagramSocket_Policy>,
58 public BSDSocketProtocol,
59 public AddressableBSDSocketProtocol
62 ///////////////////////////////////////////////////////////////////////////
68 void init_client() const; ///< Create unconnected client socket
69 /**< \note This member is implicitly called from the
70 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
72 void init_client(UNSocketAddress const & address) const;
73 ///< Create client socket and bind
74 /**< Creates a new client socket and bind to the given
76 \param[in] local address to bind to */
77 /**< \note This member is implicitly called from the
78 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
82 ///\name Abstract Interface Implementation
84 std::auto_ptr<SocketProtocol> clone() const;
89 typedef ProtocolClientSocketHandle<UNDatagramSocketProtocol> UNDatagramClientSocketHandle;
91 typedef MakeSocketPolicy<
92 UNDatagramSocket_Policy,
94 >::policy UDPv6Socket_Policy;
96 ///////////////////////////////hh.e////////////////////////////////////////
97 //#include "UNDatagramSocketHandle.cci"
98 //#include "UNDatagramSocketHandle.ct"
99 //#include "UNDatagramSocketHandle.cti"
106 // comment-column: 40
107 // c-file-style: "senf"
108 // indent-tabs-mode: nil
109 // ispell-local-dictionary: "american"
110 // compile-command: "scons -u test"