X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FClientSocketHandle.hh;h=49eafe9afffd23125151e690dba074d719dd1eb6;hb=15c5e1939d77dfea97da38df7526bcb84a53460b;hp=a4280e89589dc1996fabdf54862b8ed873de4699;hpb=ac6a813d9d99f7add4e13aff7a4bcd314d5604a6;p=senf.git diff --git a/Socket/ClientSocketHandle.hh b/Socket/ClientSocketHandle.hh index a4280e8..49eafe9 100644 --- a/Socket/ClientSocketHandle.hh +++ b/Socket/ClientSocketHandle.hh @@ -20,8 +20,9 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// TODO: Move all not template-parameter dependent code into a -// non-template base class +/** \file + \brief senf::ClientSocketHandle public header + */ #ifndef HH_ClientSocketHandle_ #define HH_ClientSocketHandle_ 1 @@ -34,11 +35,67 @@ ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { - - + + /// \addtogroup handle_group + /// @{ + template class ServerSocketHandle; - /** \brief + /** \brief Generic SocketHandle with client interface + + This class provides the client side policy interface of the + socket abstraction. ClientSocketHandle defines the complete + policy interface. It does not implement any functionality + itself however. All calls are forward to the following policy + classes: + + + + + + + + + + + + + +
ClientSocketHandle member Policy member
read() ReadPolicy::read (\ref senf::ReadPolicyBase)
readfrom() ReadPolicy::readfrom (\ref senf::ReadPolicyBase)
write() WritePolicy::write (\ref senf::WritePolicyBase)
writeto() WritePolicy::writeto (\ref senf::WritePolicyBase)
connect() AddressingPolicy::connect (\ref senf::AddressingPolicyBase)
bind() AddressingPolicy::bind (\ref senf::AddressingPolicyBase)
peer() AddressingPolicy::peer (\ref senf::AddressingPolicyBase)
local() AddressingPolicy::local (\ref senf::AddressingPolicyBase)
rcvbuf() BufferingPolicy::sndbuf (\ref senf::BufferingPolicyBase)
sndbuf() BufferingPolicy::rcvbuf (\ref senf::BufferingPolicyBase)
+ + It is important to note, that not all members are always + accessible. Which are depends on the \c Policy template + argument. If any of the policy axis is left unspecified the + corresponding members will not be callable (you will get a + compile time error). Even if every policy axis is defined, + some members might (and will) not exist depending on the exact + policy. To find out, which members are available, you have to + check the documentation of the policy classes. You can also + find a summary of all active members in the leaf protocol + class documentation. + + \todo Move all not template-parameter dependent code into a + non-template base class + + \idea Give SocketHandle (and therefore ClientSocketHandle and + ServerSocketHandle) a \c protocol() template member and an + additional template arg \c Policies. This arg should be a + typelist of Poclicy classes which can be accessed. You use + protocol() to access a protocol class. \c + Policies can of course be underspecified or even empty. + + \idea add more flexible read/write members for a) + boost::arrays and arrays of other types b) std::vector (which + uses contiguous memory ..) c) other random-access containers + (we should use some configurable trait class to identify + containers with contiguous storage). Probably we should just + use a generic Boost.Range interface. Here we again come to the + point: make all except the most basic members be non-member + algorithms ? this would make the configuration of such + extenden members more flexible. + + \see \ref policy_group + \ref protocol_group */ template class ClientSocketHandle @@ -74,7 +131,7 @@ namespace senf { /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// - ///\name reading and writing + ///\name Reading and Writing ///@{ // read from socket (connected or unconnected) @@ -141,6 +198,7 @@ namespace senf { friend class senf::ServerSocketHandle; }; + /// @} } ///////////////////////////////hh.e////////////////////////////////////////