X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FSocketHandle.hh;h=a119d2b4fef38dc5aec5d309b4fc3a8c76016d2f;hb=99822a43b5a79b68563b8ae09e1f36791ede66b1;hp=6d36be8c225dd3951c65a0400d02dbaa928cc197;hpb=2cf8d7ad86c57dd87314c1ea7bf980a189d48552;p=senf.git diff --git a/Socket/SocketHandle.hh b/Socket/SocketHandle.hh index 6d36be8..a119d2b 100644 --- a/Socket/SocketHandle.hh +++ b/Socket/SocketHandle.hh @@ -24,8 +24,8 @@ \brief SocketHandle public header */ -#ifndef HH_SocketHandle_ -#define HH_SocketHandle_ 1 +#ifndef HH_SENF_Socket_SocketHandle_ +#define HH_SENF_Socket_SocketHandle_ 1 // Custom includes #include // std::auto_ptr @@ -147,6 +147,16 @@ namespace senf { every derived class. See the state() documentation. */ + template + 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 + will be thrown. + \throws std::bad_cast if \a Facet is not a protocol + facet of this socket + \returns the \a Facet protocol facet of this socket */ + protected: explicit SocketHandle(std::auto_ptr body); ///< Initialize SocketHandle providing the protocol @@ -180,7 +190,7 @@ namespace senf { /**< 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 */