X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FUN%2FUNProtocol.hh;h=5314196e4750bcf025656861a286f5a6f794a9b5;hb=6f50bf49e282c0528f51faa0a245bbfa2b867399;hp=38e9edcde9ec72f4ed83714605092da62db477ff;hpb=01affde68cb93a334a2e6daabd2010b9a14b4553;p=senf.git diff --git a/Socket/Protocols/UN/UNProtocol.hh b/Socket/Protocols/UN/UNProtocol.hh index 38e9edc..5314196 100644 --- a/Socket/Protocols/UN/UNProtocol.hh +++ b/Socket/Protocols/UN/UNProtocol.hh @@ -1,7 +1,9 @@ +// $Id$ +// // Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum NETwork research (NET) -// David Wagner +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// David Wagner // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -42,28 +44,34 @@ namespace senf { This protocol facet introduces all the socket api protocol members which are related to Unix Domain addressing. - - \todo connect() is only available on stream sockets. We want to access bind() and connect() - via the ClientSocketHandle -> see SocketProtocol todo point */ class UNProtocol : public virtual SocketProtocol { public: - void connect(UNSocketAddress const & address) const; ///< Connect to a unix domain socket - /**< \todo make this obsolete by allowing access to the - ClientSocketHandle from ConcreateSocketProtocol - \param[in] address Address to connect to */ - void bind(UNSocketAddress const & address) const; ///< Set local socket address (path) - /**< \todo make this obsolete by allowing access to the - ClientSocketHandle from ConcreateSocketProtocol - \param[in] address Address to set */ - ///\name Abstract Interface Implementation - ///@{ + 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. */ ///\name Abstract Interface Implementation + ///@{ unsigned available() const; bool eof() const; - }; + + private: + void check_and_unlink() const; + + std::string path_; + }; + + ///@} } ///////////////////////////////hh.e////////////////////////////////////////