NEW FILE HEADER / COPYRIGHT FORMAT
[senf.git] / Socket / Protocols / UN / UNProtocol.hh
index b210c89..298124a 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2007 
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
+// Fraunhofer Institute for Open Communication Systems (FOKUS) 
 // Kompetenzzentrum NETwork research (NET)
-//     David Wagner <david.wagner@fokus.fraunhofer.de>
+//     David Wagner <dw6@berlios.de>
 //
 // 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
@@ -58,6 +58,27 @@ namespace senf {
                                         /**< \todo make this obsolete by allowing access to the
                                              ClientSocketHandle from ConcreateSocketProtocol
                                              \param[in] address Address to set */
+        
+        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_;
     };
 }