X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FReadWritePolicy.hh;h=24d5cea6bf246a5e8c1bf9bd37d13ee35c8e9902;hb=b1f9349b1f3521d58cbef52ead0f2e5303a58c9e;hp=c173abcbb9e1f072e74e960e12333d4bd2835ff4;hpb=f73fa16ed5abdce272ac77f8b8b9ef2b9922c266;p=senf.git diff --git a/Socket/ReadWritePolicy.hh b/Socket/ReadWritePolicy.hh index c173abc..24d5cea 100644 --- a/Socket/ReadWritePolicy.hh +++ b/Socket/ReadWritePolicy.hh @@ -1,8 +1,8 @@ // $Id$ // // Copyright (C) 2006 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -26,8 +26,8 @@ \todo ReadWritePolicy.test.cc */ -#ifndef HH_ReadWritePolicy_ -#define HH_ReadWritePolicy_ 1 +#ifndef HH_SENF_Socket_ReadWritePolicy_ +#define HH_SENF_Socket_ReadWritePolicy_ 1 // Custom includes #include "SocketPolicy.hh" @@ -59,14 +59,14 @@ namespace senf { \param[in] size size of buffer \returns number of bytes read */ # ifndef DOXYGEN - template - static unsigned readfrom(ClientSocketHandle handle, char * buffer, unsigned size, - typename Policy::AddressingPolicy::Address & address, + template + static unsigned readfrom(ClientSocketHandle handle, char * buffer, unsigned size, + typename SPolicy::AddressingPolicy::Address & address, typename IfCommunicationPolicyIs< - Policy,UnconnectedCommunicationPolicy>::type * = 0); + SPolicy,UnconnectedCommunicationPolicy>::type * = 0); # else - template - static unsigned readfrom(ClientSocketHandle handle, char * buffer, unsigned size, + template + static unsigned readfrom(ClientSocketHandle handle, char * buffer, unsigned size, typename Policy::AddressingPolicy::Address & address); ///< read data from socket returning peer address /**< \param[in] handle socket handle to read from @@ -78,7 +78,7 @@ namespace senf { private: static unsigned do_readfrom(FileHandle handle, char * buffer, unsigned size, - struct ::sockaddr * addr, socklen_t len); + struct ::sockaddr * addr, socklen_t * len); }; /** \brief ReadPolicy for unreadable sockets @@ -98,13 +98,13 @@ namespace senf { struct WriteablePolicy : public WritePolicyBase { # ifndef DOXYGEN - template - static unsigned write(ClientSocketHandle handle, char const * buffer, unsigned size, + template + static unsigned write(ClientSocketHandle handle, char const * buffer, unsigned size, typename IfCommunicationPolicyIs< - Policy,ConnectedCommunicationPolicy>::type * = 0); + SPolicy,ConnectedCommunicationPolicy>::type * = 0); # else - template - static unsigned write(ClientSocketHandle handle, char const * buffer, + template + static unsigned write(ClientSocketHandle handle, char const * buffer, unsigned size); ///< write data to socket /**< This member is only enabled if the socket uses @@ -118,16 +118,16 @@ namespace senf { \returns number of bytes written */ # endif # ifndef DOXYGEN - template - static unsigned writeto(ClientSocketHandle handle, + template + static unsigned writeto(ClientSocketHandle handle, typename boost::call_traits< - typename Policy::AddressingPolicy::Address>::param_type addr, + typename SPolicy::AddressingPolicy::Address>::param_type addr, char const * buffer, unsigned size, typename IfCommunicationPolicyIs< - Policy,UnconnectedCommunicationPolicy>::type * = 0); + SPolicy,UnconnectedCommunicationPolicy>::type * = 0); # else - template - static unsigned writeto(ClientSocketHandle handle, + template + static unsigned writeto(ClientSocketHandle handle, typename Policy::AddressingPolicy::Address const & addr, char const * buffer, unsigned size); ///< write data to socket sending to given peer