4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // David Wagner <dw6@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief ConnectedUNDatagramSocketHandle public header */
26 #ifndef HHE_SENF_Socket_Protocols_UN_ConnectedUNDatagramSocketHandle_
27 #define HHE_SENF_Socket_Protocols_UN_ConnectedUNDatagramSocketHandle_
30 #include "UNAddressing.hh"
31 #include "UNSocketProtocol.hh"
32 #include "../../../Socket/Protocols/BSDSocketProtocol.hh"
33 #include "../../../Socket/FramingPolicy.hh"
34 #include "../../../Socket/CommunicationPolicy.hh"
35 #include "../../../Socket/ReadWritePolicy.hh"
36 #include "../../../Socket/ProtocolClientSocketHandle.hh"
38 //#include "UNDatagramSocketHandle.mpp"
39 ///////////////////////////////hh.p////////////////////////////////////////
43 typedef MakeSocketPolicy<
45 DatagramFramingPolicy,
46 ConnectedCommunicationPolicy,
49 >::policy ConnectedUNDatagramSocket_Policy; ///< Socket Policy of the Unix Domain Datagram Protocol (connected)
51 /// \ingroup concrete_protocol_group
54 /** \brief Unix Domain Datagram Socket Protocol (connected)
56 \par Socket Handle typedefs:
57 \ref ConnectedUNDatagramClientSocketHandle (ProtocolClientSocketHandle)
59 \par Policy Interface: (to be checked)
60 ClientSocketHandle::read(), ClientSocketHandle::readfrom(),
61 ClientSocketHandle::writeto(), ClientSocketHandle::bind(), ClientSocketHandle::local()
66 ConnectedUNDatagramSocketProtocol provides an datagram protocol socket based on the unix domain addressing which operates in a connected mode.
68 This class is utilized as the protocol class of the ProtocolClientSocketHandle
69 via the Socket Handle typedefs above.
72 class ConnectedUNDatagramSocketProtocol
73 : public ConcreteSocketProtocol<ConnectedUNDatagramSocket_Policy,
74 ConnectedUNDatagramSocketProtocol>,
75 public UNSocketProtocol,
76 public BSDSocketProtocol,
77 public AddressableBSDSocketProtocol
80 ///////////////////////////////////////////////////////////////////////////
86 void init_client() const; ///< Create unconnected client socket
87 /**< \note This member is implicitly called from the
88 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
90 void init_client(UNSocketAddress const & address) const;
91 ///< Create client socket and connect
92 /**< Creates a new client socket and connects to the given
94 \param[in] address peer address to connect to */
95 /**< \note This member is implicitly called from the
96 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
102 typedef ProtocolClientSocketHandle<ConnectedUNDatagramSocketProtocol> ConnectedUNDatagramClientSocketHandle;
108 ///////////////////////////////hh.e////////////////////////////////////////
109 //#include "ConnectedUNDatagramSocketHandle.cci"
110 //#include "ConnectedUNDatagramSocketHandle.ct"
111 //#include "ConnectedUNDatagramSocketHandle.cti"
118 // comment-column: 40
119 // c-file-style: "senf"
120 // indent-tabs-mode: nil
121 // ispell-local-dictionary: "american"
122 // compile-command: "scons -u test"