X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FUN%2FConnectedUNDatagramSocketHandle.cc;h=af7fd4434ff6abbae38649f2f5494ef4ad3d55d1;hb=fd3a0e8ac95d1158e9ea661ddf9187b67c70169f;hp=385549ad4e21fbd24e681633146413ef855c43b1;hpb=d4560ae7d7e58499918c66239fb405d518bd42fc;p=senf.git diff --git a/Socket/Protocols/UN/ConnectedUNDatagramSocketHandle.cc b/Socket/Protocols/UN/ConnectedUNDatagramSocketHandle.cc index 385549a..af7fd44 100644 --- a/Socket/Protocols/UN/ConnectedUNDatagramSocketHandle.cc +++ b/Socket/Protocols/UN/ConnectedUNDatagramSocketHandle.cc @@ -1,7 +1,9 @@ -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum NETwork research (NET) -// David Wagner +// $Id$ +// +// Copyright (C) 2007 +// 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 @@ -36,24 +38,29 @@ prefix_ void senf::ConnectedUNDatagramSocketProtocol::init_client() const { - int sock = ::socket(PF_UNIX,SOCK_DGRAM,0); + int sock = ::socket(PF_UNIX, SOCK_DGRAM, 0); if (sock < 0) - throwErrno(); - fd(sock); + SENF_THROW_SYSTEM_EXCEPTION("Could not create socket(PF_UNIX,SOCK_DGRAM,0)."); + fd(sock); } prefix_ void senf::ConnectedUNDatagramSocketProtocol::init_client(UNSocketAddress const & address) const { init_client(); - connect(address); -} - -prefix_ std::auto_ptr senf::ConnectedUNDatagramSocketProtocol::clone() - const -{ - return std::auto_ptr(new ConnectedUNDatagramSocketProtocol()); + clientHandle().connect(address); } ///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_ //#include "UNDatagramSocketHandle.mpp" + + +// 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: