moved Sniffer into new Examples directory
[senf.git] / Socket / SocketHandle.cti
index e93ec63..56c1472 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 //
-// Copyright (C) 2006 
+// Copyright (C) 2006
 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
 //     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
@@ -21,7 +21,7 @@
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 /** \file
-    \brief senf::SocketHandle inline template implementation
+    \brief SocketHandle inline template implementation
  */
 
 #include "SocketHandle.ih"
@@ -51,7 +51,7 @@ senf::SocketHandle<SocketPolicy>::operator=(SocketHandle<OtherPolicy> other)
 }
 
 template <class SocketPolicy>
-prefix_ 
+prefix_
 senf::SocketHandle<SocketPolicy>::SocketHandle(std::auto_ptr<SocketProtocol> protocol,
                                                       bool isServer)
     : FileHandle(std::auto_ptr<FileBody>(new SocketBody(protocol,isServer)))
@@ -106,7 +106,7 @@ senf::SocketHandle<SocketPolicy>::cast_dynamic(FileHandle handle)
 {
     // throws bad_cast if the body is not a SocketBody
     SocketBody & body (dynamic_cast<SocketBody&>(FileHandle::body(handle)));
-    // throws bad_cast if the poplicy is not compatible
+    // throws bad_cast if the policy is not compatible
     SocketPolicy::checkBaseOf(body.protocol().policy());
     return cast_static(handle);
 }
@@ -160,6 +160,11 @@ prefix_ bool senf::check_socket_cast(Source handle)
 template <class SocketPolicy>
 prefix_ void senf::SocketHandle<SocketPolicy>::state(SocketStateMap & map, unsigned lod)
 {
+    // We use typeid here even though the type of *this is static
+    // (SocketHandle is not polymorphic and has no vtable). This will
+    // automatically include the SocketPolicy template parameter in
+    // the type name and therefore show the \e static policy of the
+    // socket handle.
     map["handle"] = prettyName(typeid(*this));
     body().state(map,lod);
 }
@@ -186,5 +191,8 @@ prefix_ senf::detail::ConvertibleString::ConvertibleString(T const & other)
 \f
 // Local Variables:
 // mode: c++
+// fill-column: 100
 // c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
 // End: