From: Mikko Rasa Date: Thu, 4 Aug 2011 22:42:33 +0000 (+0300) Subject: Update TimeDelta to timeval conversion X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=12b93b4f1655bf9c26f73e67cf78b86eeb1eaa97;p=libs%2Fnet.git Update TimeDelta to timeval conversion --- diff --git a/source/socket.cpp b/source/socket.cpp index 5afb9c2..a4675f5 100644 --- a/source/socket.cpp +++ b/source/socket.cpp @@ -5,6 +5,7 @@ #endif #include #include +#include #include #include "socket.h" @@ -136,8 +137,7 @@ void Socket::close() void Socket::set_timeout(const Time::TimeDelta &timeout) { #ifndef WIN32 - timeval tv; - timeout.fill_timeval(tv); + timeval tv = Time::rawtime_to_timeval(timeout.raw()); set_option(SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(timeval)); set_option(SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(timeval)); #else