X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FBSDSocketProtocol.hh;h=341b70ba22e469317b0f12059ec4c2046229212e;hb=a7adef379311a16ab413aadd32f044c6e339d711;hp=988a6272e2889f0cb9a84403aad4aedc8e98996b;hpb=5ed1fa1c42763aebad06c1e4ac8fc5a19e15519a;p=senf.git diff --git a/Socket/Protocols/BSDSocketProtocol.hh b/Socket/Protocols/BSDSocketProtocol.hh index 988a627..341b70b 100644 --- a/Socket/Protocols/BSDSocketProtocol.hh +++ b/Socket/Protocols/BSDSocketProtocol.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 @@ -59,8 +59,37 @@ namespace senf { forever. \param[in] enable \c true to activate linger \param[in] timeout linger timeout in seconds */ + boost::uint8_t priority() const; ///< Get packet priority assigned to outgoing packets + /**< This call will return the priority value assigned to + packets sent via this socket. Depending on the + protocol, this value may also be placed inside the + packet headers (for IPv4, this is the TOS value). + \returns current socket priority */ + void priority(boost::uint8_t value) const; ///< Set packet priority (e.g. TOS) + /**< Changes the packet queueing priority. Additionally may + set protocol specific options. For IPv4 sockets, it + sets the TOS field. + \param[in] value new socket priority */ - }; + unsigned rcvbuf() const; ///< Check receive buffer size + /**< \returns size of receive buffer in bytes + \internal Linux doubles the buffer size internally when + changing it to cater for additional space needed by + the linux kernel. This call will therefore return + only half the value reported by the kernel. */ + void rcvbuf(unsigned size) const; ///< Change receive buffer size + /**< \param[in] size new receive buffer size */ + + unsigned sndbuf() const; ///< Check send buffer size + /**< \returns size of send buffer in bytes + \internal Linux doubles the buffer size internally when + changing it to cater for additional space needed by + the linux kernel. This call will therefore return + only half the value reported by the kernel. */ + void sndbuf(unsigned size) const; ///< Change size of send buffer + /**< \param[in] size new send buffer size */ + + }; /** \brief Protocol facet providing basic connection oriented BSD socket functions @@ -78,33 +107,6 @@ namespace senf { /**< A \c true value enables \c SO_REUSEADDR, \c false will disable it. \param[in] value new \c SO_REUSEADDR state */ - - boost::uint8_t priority() const; ///< Get packet priority assigned to outgoing packets - /**< This call will return the priority value assigned to - packets sent via this socket. Depending on the - protocol, this value may also be placed inside the - packet headers (for IPv4, this is the TOS value). - \returns current socket priority */ - void priority(boost::uint8_t value) const; ///< Set packet priority (e.g. TOS) - /**< Changes the packet queueing priority. Additionally may - set protocol specific options. For IPv4 sockets, it - sets the TOS field. - \param[in] v new socket priority */ - - unsigned rcvbuf() const; ///< Check receive buffer size - /**< \param[in] handle socket handle to check - \returns size of receive buffer in bytes */ - void rcvbuf(unsigned size) const; ///< Change receive buffer size - /**< \param[in] handle socket handle - \param[in] size new receive buffer size */ - - unsigned sndbuf() const; ///< Check send buffer size - /**< \param[in] handle socket handle to check - \returns size of send buffer in bytes */ - void sndbuf(unsigned size) const; ///< Change size of send buffer - /**< \param[in] handle socket handle - \param[in] size new send buffer size */ - }; /// @}