X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsocket.cpp;h=a4675f593b6bc95ed9e0d4ad40f442e5bcf78ee1;hb=f9cc7ff2e1e5af865220e9fbe16673619ecb78bd;hp=c4e98a363a89b9779517f9aab9c95a9cb1a84742;hpb=4feef9d7a2d96668660686d3812973e6f788359a;p=libs%2Fnet.git diff --git a/source/socket.cpp b/source/socket.cpp index c4e98a3..a4675f5 100644 --- a/source/socket.cpp +++ b/source/socket.cpp @@ -4,7 +4,8 @@ #include #endif #include -#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