protocols are implemented using a simple multiple-inheritance hierarchy as shown above.
Since the protocol class is protocol specific (how intelligent ...), the protocol class also
- defines the complete socket policy to be used with it's protocol. Complete meaning, that every
- policy axis must be assigned it's the most specific (that is derived) policy class to be used
- with the protocol.
+ defines the \e complete socket policy to be used with it's protocol. Complete meaning, that
+ every policy axis must be assigned it's the most specific (that is derived) policy class to be
+ used with the protocol and that no policy axis is allowed to be left unspecified.
\see
\ref handle_group \n
\attention SocketProtocol must \e always be inherited using public \e virtual inheritance.
*/
- class SocketProtocol : boost::noncopyable
+ class SocketProtocol
+ : boost::noncopyable
{
public:
///////////////////////////////////////////////////////////////////////////
\c true only, if at end-of-file. If the protocol does
not support the notion of EOF, this member should
always return \c false. */
+
+ virtual void close() const; ///< Close socket
+ /**< This override will automatically \c shutdown() the
+ socket whenever it is closed.
+ \throws senf::SystemException */
+ virtual void terminate() const; ///< Forcibly close socket
+ /**< This override will automatically \c shutdown() the
+ socket whenever it is called. Additionally it will
+ disable SO_LINGER to ensure, that v_terminate will not
+ block. Like the overriden method, this member will ignore
+ failures and will never throw. It therefore safe to be
+ called from a destructor. */
+
virtual void state(SocketStateMap & map, unsigned lod) const;
///< Return socket state information
/**< This member is called to add state information to the