X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FReadWritePolicy.hh;h=023b3f66476b80ed156da6190c8bcff0421d91ca;hb=fd3a0e8ac95d1158e9ea661ddf9187b67c70169f;hp=c173abcbb9e1f072e74e960e12333d4bd2835ff4;hpb=f73fa16ed5abdce272ac77f8b8b9ef2b9922c266;p=senf.git diff --git a/Socket/ReadWritePolicy.hh b/Socket/ReadWritePolicy.hh index c173abc..023b3f6 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 @@ -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