Merged revisions 570-572,574-575,578-579,581-595,598-611 via svnmerge from
[senf.git] / Socket / SocketProtocol.cti
index 076489c..1c16b75 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS) 
+// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+//     Stefan Bund <g0dil@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
 //#include "SocketProtocol.ih"
 
 // Custom includes
+#include "SocketHandle.hh"
 
 #define prefix_ inline
 ///////////////////////////////cti.p///////////////////////////////////////
 
+///////////////////////////////////////////////////////////////////////////
+// senf::ConcreteSocketProtocol<SocketPolicy>
+
 template <class SocketPolicy>
 prefix_ senf::ConcreteSocketProtocol<SocketPolicy>::~ConcreteSocketProtocol()
 {}
@@ -43,6 +47,25 @@ senf::ConcreteSocketProtocol<SocketPolicy>::policy()
     return policy_;
 }
 
+////////////////////////////////////////
+// protected members
+
+template <class SocketPolicy>
+prefix_ senf::ClientSocketHandle<SocketPolicy>
+senf::ConcreteSocketProtocol<SocketPolicy>::clientHandle()
+    const
+{
+    return static_socket_cast< ClientSocketHandle<Policy> >(fh());
+}
+
+template <class SocketPolicy>
+prefix_ senf::ServerSocketHandle<SocketPolicy>
+senf::ConcreteSocketProtocol<SocketPolicy>::serverHandle()
+    const
+{
+    return static_socket_cast< ServerSocketHandle<Policy> >(fh());
+}
+
 ///////////////////////////////cti.e///////////////////////////////////////
 #undef prefix_
 
@@ -53,4 +76,6 @@ senf::ConcreteSocketProtocol<SocketPolicy>::policy()
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: