summaryrefslogtreecommitdiff
path: root/windows
diff options
context:
space:
mode:
authormoret <moret@0c269be4-1314-0410-8aa9-9f06e86f4224>2008-07-31 09:35:56 +0000
committermoret <moret@0c269be4-1314-0410-8aa9-9f06e86f4224>2008-07-31 09:35:56 +0000
commit6121648e14d038b2c02956b8e7dd7810172d9ed2 (patch)
treefbec45105874ceb5901650247df1d5c445329b23 /windows
parentf1cbf630d5fcaf77a40dee00ed0284b547063fdb (diff)
downloadjack2-6121648e14d038b2c02956b8e7dd7810172d9ed2.tar.gz
Correct timeout settings in netjack2
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2753 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'windows')
-rw-r--r--windows/JackNetWinSocket.cpp6
-rw-r--r--windows/JackNetWinSocket.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/windows/JackNetWinSocket.cpp b/windows/JackNetWinSocket.cpp
index a511614d..08bf71a6 100644
--- a/windows/JackNetWinSocket.cpp
+++ b/windows/JackNetWinSocket.cpp
@@ -263,12 +263,12 @@ namespace Jack
}
//tiemout************************************************************************************************************
- int JackNetWinSocket::SetTimeOut ( float& msec )
+ int JackNetWinSocket::SetTimeOut ( int& usec )
{
//negative timeout, or exceeding 10s, return
- if ( ( msec < 0 ) || ( msec > 10000 ) )
+ if ( ( msec < 0 ) || ( usec > 10000000 ) )
return -1;
- int time = ( int ) msec;
+ int time = usec / 1000;
return SetOption ( SOL_SOCKET, SO_RCVTIMEO, &time, sizeof ( time ) );
}
diff --git a/windows/JackNetWinSocket.h b/windows/JackNetWinSocket.h
index 51c9fd58..044a01cd 100644
--- a/windows/JackNetWinSocket.h
+++ b/windows/JackNetWinSocket.h
@@ -81,7 +81,7 @@ namespace Jack
int GetOption ( int level, int optname, void* optval, SOCKLEN* optlen );
//timeout
- int SetTimeOut ( float& msec );
+ int SetTimeOut ( int& usec );
//local loop
int SetLocalLoop();