Utils: Removed ErrnoException and implemented generic Exception base-class
[senf.git] / Socket / Protocols / UN / ConnectedUNDatagramSocketHandle.cc
index 14d1874..efe1d7f 100644 (file)
@@ -1,6 +1,8 @@
-// Copyright (C) 2007 
-// Fraunhofer Institute for Open Communication Systems (FOKUS) 
-// Kompetenzzentrum NETwork research (NET)
+// $Id$
+//
+// Copyright (C) 2007
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     David Wagner <dw6@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -38,22 +40,27 @@ prefix_ void senf::ConnectedUNDatagramSocketProtocol::init_client() const
 {
     int sock = ::socket(PF_UNIX,SOCK_DGRAM,0);
     if (sock < 0)
-        throwErrno();
+        throw SystemException();
    fd(sock);
 }
 
 prefix_ void senf::ConnectedUNDatagramSocketProtocol::init_client(UNSocketAddress const & address) const 
 {
     init_client();
-    connect(address);
-}
-
-prefix_ std::auto_ptr<senf::SocketProtocol> senf::ConnectedUNDatagramSocketProtocol::clone()
-    const
-{
-    return std::auto_ptr<SocketProtocol>(new ConnectedUNDatagramSocketProtocol());
+    clientHandle().connect(address);
 }
 
 ///////////////////////////////cc.e////////////////////////////////////////
 #undef prefix_
 //#include "UNDatagramSocketHandle.mpp"
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End: