{}
template <class SocketProtocol>
-prefix_ SocketProtocol const &
+prefix_ SocketProtocol &
senf::ProtocolClientSocketHandle<SocketProtocol>::protocol()
{
- SENF_ASSERT( dynamic_cast<SocketProtocol const *>(&this->body().protocol()) );
+ SENF_ASSERT( dynamic_cast<SocketProtocol *>(&this->body().protocol()) );
// Need dynamic_cast here, since senf::SocketProtocol is a
// virtual base
- return dynamic_cast<SocketProtocol const &>(this->body().protocol());
+ return dynamic_cast<SocketProtocol &>(this->body().protocol());
}
template <class SocketProtocol>
///@}
///////////////////////////////////////////////////////////////////////////
- Protocol const & protocol(); ///< Access the protocol interface
+ Protocol & protocol(); ///< Access the protocol interface
/**< The returned protocol class reference gives access to
the complete protocol interface as defined by that
class. See the respective protocol class documentation.
#include BOOST_PP_ITERATE()
template <class SocketProtocol>
-prefix_ SocketProtocol const &
+prefix_ SocketProtocol &
senf::ProtocolServerSocketHandle<SocketProtocol>::protocol()
{
SENF_ASSERT( dynamic_cast<SocketProtocol const *>(&this->body().protocol()) );
// Need dynamic_cast here, since senf::SocketProtocol is a
// virtual base
- return dynamic_cast<SocketProtocol const &>(this->body().protocol());
+ return dynamic_cast<SocketProtocol &>(this->body().protocol());
}
template <class SocketProtocol>
///@}
///////////////////////////////////////////////////////////////////////////
- Protocol const & protocol(); ///< Access the protocol interface
+ Protocol & protocol(); ///< Access the protocol interface
/**< The returned protocol class reference gives access to
the complete protocol interface as defined by that
class. See the respective protocol class documentation.
{}
prefix_ senf::SocketProtocol & senf::SocketBody::protocol()
-{
- return const_cast<SocketProtocol &>(v_protocol());
-}
-
-prefix_ senf::SocketProtocol const & senf::SocketBody::protocol()
const
{
- return v_protocol();
+ return const_cast<SocketProtocol &>(v_protocol());
}
prefix_ bool senf::SocketBody::isServer()
}
template <class SPolicy>
-prefix_ senf::SocketProtocol const & senf::SocketHandle<SPolicy>::protocol()
+prefix_ senf::SocketProtocol & senf::SocketHandle<SPolicy>::protocol()
const
{
return body().protocol();
template <class SPolicy>
template <class Facet>
-prefix_ Facet const & senf::SocketHandle<SPolicy>::facet()
+prefix_ Facet & senf::SocketHandle<SPolicy>::facet()
{
try {
- return dynamic_cast<Facet const &>(protocol());
+ return dynamic_cast<Facet &>(protocol());
}
SENF_WRAP_EXC(std::bad_cast)
}
documentation. */
template <class Facet>
- Facet const & facet(); ///< Access a protocol facet
+ Facet & facet(); ///< Access a protocol facet
/**< This member will try to access the given protocol facet
of the socket. If \a Facet is a valid facet of the
protocol, it is returned, otherwise \c std::bad_cast
/**< This member replaces the corresponding FileHandle
member and returns an appropriately cast body
reference */
- SocketProtocol const & protocol() const;
+ SocketProtocol & protocol() const;
///< Access protocol class
void assign(FileHandle other); /**< \internal */
///@}
///////////////////////////////////////////////////////////////////////////
- SocketProtocol & protocol(); ///< Access the protocol instance
- SocketProtocol const & protocol() const; ///< Access the protocol instance (const)
+ SocketProtocol & protocol() const; ///< Access the protocol instance
bool isServer(); ///< Check socket type
/**< \return \c true, if this is a server socket, \c false