diff --git a/ChangeLog b/ChangeLog index 6f6d50c0..b5543a6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,7 @@ Chris Caudle 2011-06-16 Stephane Letz * Changes in NetJack2 connection management: no more timeout, any transmission error considered as fatal. + * NetJack2 : timeout again... 2011-06-11 Stephane Letz diff --git a/common/JackNetInterface.cpp b/common/JackNetInterface.cpp index b45cbefc..ed2a5d6e 100644 --- a/common/JackNetInterface.cpp +++ b/common/JackNetInterface.cpp @@ -206,6 +206,7 @@ namespace Jack return true; } + /* int JackNetMasterInterface::SetRxTimeout() { jack_log("JackNetMasterInterface::SetRxTimeout"); @@ -225,6 +226,15 @@ namespace Jack return fSocket.SetTimeOut(static_cast(time)); } + */ + + int JackNetMasterInterface::SetRxTimeout() + { + jack_log("JackNetMasterInterface::SetRxTimeout"); + float time = 3 * 1000000.f * (static_cast(fParams.fPeriodSize) / static_cast(fParams.fSampleRate)); + return fSocket.SetTimeOut(static_cast(time)); + } + bool JackNetMasterInterface::SetParams() { @@ -296,11 +306,10 @@ namespace Jack } //set the new timeout for the socket - /* if (SetRxTimeout() == SOCKET_ERROR) { jack_error("Can't set rx timeout : %s", StrError(NET_ERROR_CODE)); goto error; - }*/ + } //set the new rx buffer size if (SetNetBufferSize() == SOCKET_ERROR) {