BSDSocketProtocol.hh

Go to the documentation of this file.
00001 // $Id: BSDSocketProtocol.hh 1742 2010-11-04 14:51:56Z g0dil $
00002 //
00003 // Copyright (C) 2006
00004 // Fraunhofer (FOKUS)
00005 // Competence Center NETwork research (NET), St. Augustin, GERMANY
00006 //     Stefan Bund <g0dil@berlios.de>
00007 //
00008 // This program is free software; you can redistribute it and/or modify
00009 // it under the terms of the GNU General Public License as published by
00010 // the Free Software Foundation; either version 2 of the License, or
00011 // (at your option) any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the
00020 // Free Software Foundation, Inc.,
00021 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00026 #ifndef HH_SENF_Socket_Protocols_BSDSocketProtocol_
00027 #define HH_SENF_Socket_Protocols_BSDSocketProtocol_ 1
00028 
00029 // Custom includes
00030 #include <senf/Socket/SocketProtocol.hh>
00031 #include <boost/cstdint.hpp>
00032 
00033 //#include "BSDSocketProtocol.mpp"
00034 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00035 
00036 namespace senf {
00037 
00039     //\{
00040 
00045     class BSDSocketProtocol
00046         : public virtual SocketProtocol
00047     {
00048     public:
00049         std::pair<bool,unsigned> linger() const; 
00050 
00055         void linger(bool enable, unsigned timeout=0) const; 
00056 
00062        boost::uint8_t priority() const;  
00063 
00068         void priority(boost::uint8_t value) const; 
00069 
00074         int error() const;              
00075 
00079         unsigned rcvbuf() const;        
00080 
00085         void rcvbuf(unsigned size) const; 
00086 
00088         unsigned sndbuf() const;        
00089 
00094         void sndbuf(unsigned size) const; 
00095 
00097      };
00098 
00104     class AddressableBSDSocketProtocol
00105         : public virtual SocketProtocol
00106     {
00107     public:
00108         bool reuseaddr() const;         
00109 
00111         void reuseaddr(bool value) const; 
00112 
00115     };
00116 
00117     //\}
00118 
00119 }
00120 
00121 
00122 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00123 //#include "BSDSocketProtocol.cci"
00124 //#include "BSDSocketProtocol.ct"
00125 //#include "BSDSocketProtocol.cti"
00126 //#include "BSDSocketProtocol.mpp"
00127 #endif
00128 
00129 
00130 // Local Variables:
00131 // mode: c++
00132 // fill-column: 100
00133 // c-file-style: "senf"
00134 // indent-tabs-mode: nil
00135 // ispell-local-dictionary: "american"
00136 // compile-command: "scons -u test"
00137 // comment-column: 40
00138 // End: