X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FReadWritePolicy.hh;h=f5f7207b89c08d9dbe7a8940dd192bdb9ae35f55;hb=65066c0e037d1de437d6121903e1dd511b41e940;hp=552b8739c76d4d09f90f9716d6275838e3cb15c7;hpb=98f3f38c5872d26fcf544a9d28efe0518e3895e2;p=senf.git diff --git a/Socket/ReadWritePolicy.hh b/Socket/ReadWritePolicy.hh index 552b873..f5f7207 100644 --- a/Socket/ReadWritePolicy.hh +++ b/Socket/ReadWritePolicy.hh @@ -61,7 +61,8 @@ namespace senf { template static unsigned readfrom(ClientSocketHandle handle, char * buffer, unsigned size, typename Policy::AddressingPolicy::Address & address, - typename IfCommunicationPolicyIs::type * = 0); + typename IfCommunicationPolicyIs< + Policy,UnconnectedCommunicationPolicy>::type * = 0); ///< read data from socket returning peer address /**< \param[in] handle socket handle to read from \param[in] buffer address of buffer to write data to @@ -92,7 +93,8 @@ namespace senf { { template static unsigned write(ClientSocketHandle handle, char const * buffer, unsigned size, - typename IfCommunicationPolicyIs::type * = 0); + typename IfCommunicationPolicyIs< + Policy,ConnectedCommunicationPolicy>::type * = 0); ///< write data to socket /**< This member is only enabled if the socket uses connected communication. Otherwise the communication @@ -105,9 +107,11 @@ namespace senf { \returns number of bytes written */ template static unsigned writeto(ClientSocketHandle handle, - typename boost::call_traits::param_type addr, + typename boost::call_traits< + typename Policy::AddressingPolicy::Address>::param_type addr, char const * buffer, unsigned size, - typename IfCommunicationPolicyIs::type * = 0); + typename IfCommunicationPolicyIs< + Policy,UnconnectedCommunicationPolicy>::type * = 0); ///< write data to socket sending to given peer /**< This member is only enabled if the socket uses unconnected communication. Otherwise no target may be @@ -116,14 +120,14 @@ namespace senf { \param[in] handle socket handle to write data to \param[in] buffer address of buffer to send \param[in] size number of bytes to write - \param[in] address peer to send data to + \param[in] addr peer to send data to \returns number of bytes written */ private: static unsigned do_write(FileHandle handle, char const * buffer, unsigned size); static unsigned do_writeto(FileHandle handle, char const * buffer, unsigned size, - struct sockaddr * addr, socklen_t len); + struct sockaddr const * addr, socklen_t len); }; /** \brief WritePolicy for unwriteable sockets @@ -153,4 +157,6 @@ namespace senf { // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: