X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FUN%2FUNDatagramSocketHandle.cc;h=4d21aec01746d07ea46e3124bdba6804958a7173;hb=1ad3873b372da6187b1fbc645bf276287d2efb54;hp=360ec03e4d12e7c3f886a5de266ba2d6032140bb;hpb=0de6c83e2769c7deb2ed3c57d7b26e8cb3fcca04;p=senf.git diff --git a/Socket/Protocols/UN/UNDatagramSocketHandle.cc b/Socket/Protocols/UN/UNDatagramSocketHandle.cc index 360ec03..4d21aec 100644 --- a/Socket/Protocols/UN/UNDatagramSocketHandle.cc +++ b/Socket/Protocols/UN/UNDatagramSocketHandle.cc @@ -1,6 +1,7 @@ -// $Id$ -// // Copyright (C) 2007 +// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) +// Kompetenzzentrum NETwork research (NET) +// 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 @@ -38,14 +39,20 @@ prefix_ void senf::UNDatagramSocketProtocol::init_client() const { int sock = ::socket(PF_UNIX,SOCK_DGRAM,0); if (sock < 0) - throw SystemException(errno); - body().fd(sock); + throwErrno(); + fd(sock); } -prefix_ void senf::UNDatagramSocketProtocol::init_client(UNSocketAddress const & address) const +prefix_ void senf::UNDatagramSocketProtocol::init_client(UNSocketAddress const & address) const { init_client(); - //bind(address); + bind(address); +} + +prefix_ std::auto_ptr senf::UNDatagramSocketProtocol::clone() + const +{ + return std::auto_ptr(new UNDatagramSocketProtocol()); } ///////////////////////////////cc.e////////////////////////////////////////