first small steps to MPEG/DVB support...
[senf.git] / Socket / ClientSocketHandle.hh
index 368e3cd..2b6f425 100644 (file)
@@ -79,15 +79,12 @@ namespace senf {
         typelist of Poclicy classes which can be accessed. You use protocol<ProtocolClass>() 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 \n
              \ref protocol_group
+
+        \fixme Add enable_if conditions so anything convertible to unsigned will not be interpreted
+            as a Range template argument but will use the unsigned variant of
+            read/readfrom/write/writeto.
       */
     template <class Policy>
     class ClientSocketHandle
@@ -116,11 +113,14 @@ namespace senf {
         ///\name Structors and default members
         ///@{
 
-        // no default constructor
+        // default default constructor
         // default copy constructor
         // default copy assignment
         // default destructor
 
+        // here to implement
+        ClientSocketHandle();
+
         // conversion constructors
         template <class OtherPolicy>
         ClientSocketHandle(ClientSocketHandle<OtherPolicy> other,
@@ -178,17 +178,18 @@ namespace senf {
                                              range. read returns a past-the-end iterator after the
                                              last character read. This iterator will point to
                                              somewhere within the input range.
-                                             \param[in/out] range Range to store data in 
+                                             \param[in,out] range Range to store data in 
                                              \returns past-the-end iterator pointer to after the
                                                  last read character 
-                                             \see \ref read() */
+                                             \see \ref read() \n
+                                                  <a href="http://www.boost.org/libs/range/index.html">Boost.Range</a> */
         template <class ForwardWritableRange>
         typename boost::range_iterator<ForwardWritableRange>::type
                      read         (ForwardWritableRange & range);
                                         ///< Read data into range
-                                        /**< \see 
-                                             read(ForwardWritableRange const &) \n
-                                             read() */
+                                        /**< \see read(ForwardWritableRange const &) \n
+                                                  read() \n
+                                                  <a href="http://www.boost.org/libs/range/index.html">Boost.Range</a>  */
         template <class Sequence>
         void         read         (Sequence & container, unsigned limit);
                                         ///< Read data into container
@@ -238,19 +239,20 @@ namespace senf {
                                              range. read returns a past-the-end iterator after the
                                              last character read. This iterator will point to
                                              somewhere within the input range.
-                                             \param[in/out] range Range to store data in 
+                                             \param[in,out] range Range to store data in 
                                              \param[out] from peers address from which the data was
                                                  received
                                              \returns past-the-end iterator pointer to after the
                                                  last read character 
-                                             \see \ref readfrom() */
+                                             \see \ref readfrom() \n
+                                                  <a href="http://www.boost.org/libs/range/index.html">Boost.Range</a>  */
         template <class ForwardWritableRange>
         typename boost::range_iterator<ForwardWritableRange>::type
                      readfrom     (ForwardWritableRange & range, Address & from);
                                         ///< Read data into range
-                                        /**< \see 
-                                             readfrom(ForwardWritableRange const&,Address&) \n
-                                             readfrom() */
+                                        /**< \see readfrom(ForwardWritableRange const&,Address&) \n
+                                                  readfrom()  \n
+                                                  <a href="http://www.boost.org/libs/range/index.html">Boost.Range</a> */
         template <class Sequence>
         void         readfrom     (Sequence & container, Address & from, unsigned limit);
                                         ///< Read data into container
@@ -265,14 +267,15 @@ namespace senf {
                                              \see \ref readfrom() */
         char *       readfrom     (char * start, char * end, Address & from);
                                         ///< Read data into memory buffer
-                                        /**< This variant will read data into the memory area at \c
-                                           buffer of size \c size. This is the most performant
-                                           version of readfrom().
-                                           \param[in] buffer address of buffer to store data at
-                                           \param[in] size size of buffer
-                                           \param[out] from peer address
-                                           \returns Number of bytes read
-                                           \see \ref readfrom() */
+                                        /**< This variant will read data into the memory area from
+                                             \a start to before \a end. This is guaranteed to be the
+                                             most efficient version  of readfrom().
+                                             \param[in] start address of buffer to store data at
+                                             \param[in] end address one past the end of the buffer
+                                             \param[out] from peers address from which the data was
+                                                 received
+                                             \returns pointer past the end of the data read
+                                             \see \ref read() */
 
 
         /** \brief Write data to socket
@@ -303,7 +306,8 @@ namespace senf {
                                         /**< \param[in] start beginning of area to write
                                              \param[in] end past-the-end pointer to area to write
                                              \returns past-the-end pointer after last byte written
-                                             \see \ref write() */
+                                             \see \ref write() \n
+                                                  <a href="http://www.boost.org/libs/range/index.html">Boost.Range</a>  */
 
         /** \brief Write data to unconnected socket
 
@@ -332,7 +336,8 @@ namespace senf {
                                              \param[in] start address of buffer to write
                                              \param[in] end past-the-end pointer after data to write
                                              \returns past-the-end iterator after last byte written
-                                             \see \ref writeto() */
+                                             \see \ref writeto() \n
+                                                  <a href="http://www.boost.org/libs/range/index.html">Boost.Range</a>  */
 
         ///////////////////////////////////////////////////////////////////////////
         ///\name Addressing
@@ -446,4 +451,6 @@ namespace senf {
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: