#include <sys/socket.h>
#include <sys/ioctl.h>
-#include "Utils/Exception.hh"
+#include "../../../Utils/Exception.hh"
//#include "UDPSocketHandle.mpp"
#define prefix_
{
int sock = ::socket(PF_INET,SOCK_DGRAM,0);
if (sock < 0)
- throw SystemException(errno);
- body().fd(sock);
+ throwErrno();
+ fd(sock);
}
prefix_ void
const
{
init_client();
- connect(address);
+ bind(address);
}
prefix_ std::auto_ptr<senf::SocketProtocol> senf::UDPv4SocketProtocol::clone()
{
int sock = ::socket(PF_INET6,SOCK_DGRAM,0);
if (sock < 0)
- throw SystemException(errno);
- body().fd(sock);
+ throwErrno();
+ fd(sock);
}
prefix_ void
const
{
init_client();
- connect(address);
+ bind(address);
}
prefix_ std::auto_ptr<senf::SocketProtocol> senf::UDPv6SocketProtocol::clone()