throw SystemException();
}
-///////////////////////////////////////////////////////////////////////////
-
-prefix_ bool senf::AddressableBSDSocketProtocol::reuseaddr()
- const
-{
- int value;
- socklen_t len (sizeof(value));
- if (::getsockopt(fd(),SOL_SOCKET,SO_REUSEADDR,&value,&len) < 0)
- throw SystemException();
- return value;
-}
-
-prefix_ void senf::AddressableBSDSocketProtocol::reuseaddr(bool value)
- const
-{
- int ivalue (value);
- if (::setsockopt(fd(),SOL_SOCKET,SO_REUSEADDR,&ivalue,sizeof(ivalue)) < 0)
- throw SystemException();
-}
-
-prefix_ boost::uint8_t senf::AddressableBSDSocketProtocol::priority()
+prefix_ boost::uint8_t senf::BSDSocketProtocol::priority()
const
{
int value;
return value;
}
-prefix_ void senf::AddressableBSDSocketProtocol::priority(boost::uint8_t value)
+prefix_ void senf::BSDSocketProtocol::priority(boost::uint8_t value)
const
{
int ivalue (value);
throw SystemException();
}
-prefix_ unsigned senf::AddressableBSDSocketProtocol::rcvbuf()
+prefix_ unsigned senf::BSDSocketProtocol::rcvbuf()
const
{
unsigned size;
return size/2;
}
-prefix_ void senf::AddressableBSDSocketProtocol::rcvbuf(unsigned size)
+prefix_ void senf::BSDSocketProtocol::rcvbuf(unsigned size)
const
{
if (::setsockopt(fd(),SOL_SOCKET,SO_RCVBUF,&size,sizeof(size)) < 0)
throw SystemException();
}
-prefix_ unsigned senf::AddressableBSDSocketProtocol::sndbuf()
+prefix_ unsigned senf::BSDSocketProtocol::sndbuf()
const
{
unsigned size;
return size/2;
}
-prefix_ void senf::AddressableBSDSocketProtocol::sndbuf(unsigned size)
+prefix_ void senf::BSDSocketProtocol::sndbuf(unsigned size)
const
{
if (::setsockopt(fd(),SOL_SOCKET,SO_SNDBUF,&size,sizeof(size)) < 0)
throw SystemException();
}
+///////////////////////////////////////////////////////////////////////////
+
+prefix_ bool senf::AddressableBSDSocketProtocol::reuseaddr()
+ const
+{
+ int value;
+ socklen_t len (sizeof(value));
+ if (::getsockopt(fd(),SOL_SOCKET,SO_REUSEADDR,&value,&len) < 0)
+ throw SystemException();
+ return value;
+}
+
+prefix_ void senf::AddressableBSDSocketProtocol::reuseaddr(bool value)
+ const
+{
+ int ivalue (value);
+ if (::setsockopt(fd(),SOL_SOCKET,SO_REUSEADDR,&ivalue,sizeof(ivalue)) < 0)
+ throw SystemException();
+}
+
/////////////////////////////cc.e////////////////////////////////////////
#undef prefix_
//#include "BSDSocketProtocol.mpp"