X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FSocketProtocol.hh;h=f2046c8169d086222f485a52574a18f6b4be157f;hb=171b7d9c23896219fc63a6c4a75fc86dfd4bb042;hp=c829647441f050e79bf9fd7a69c4376b30e296b1;hpb=344c0f9eb4ea24e789e4dbb5e1d55006d288c2b1;p=senf.git diff --git a/Socket/SocketProtocol.hh b/Socket/SocketProtocol.hh index c829647..f2046c8 100644 --- a/Socket/SocketProtocol.hh +++ b/Socket/SocketProtocol.hh @@ -65,9 +65,9 @@ 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 @@ -126,7 +126,8 @@ namespace senf { \attention SocketProtocol must \e always be inherited using public \e virtual inheritance. */ - class SocketProtocol : boost::noncopyable + class SocketProtocol + : boost::noncopyable { public: /////////////////////////////////////////////////////////////////////////// @@ -180,6 +181,19 @@ namespace senf { \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