Browse Source

NetJack2 : timeout again...

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4458 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.8
sletz 14 years ago
parent
commit
751f5b0fa6
2 changed files with 12 additions and 2 deletions
  1. +1
    -0
      ChangeLog
  2. +11
    -2
      common/JackNetInterface.cpp

+ 1
- 0
ChangeLog View File

@@ -38,6 +38,7 @@ Chris Caudle
2011-06-16 Stephane Letz <letz@grame.fr>

* Changes in NetJack2 connection management: no more timeout, any transmission error considered as fatal.
* NetJack2 : timeout again...

2011-06-11 Stephane Letz <letz@grame.fr>



+ 11
- 2
common/JackNetInterface.cpp View File

@@ -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<int>(time));
}
*/
int JackNetMasterInterface::SetRxTimeout()
{
jack_log("JackNetMasterInterface::SetRxTimeout");
float time = 3 * 1000000.f * (static_cast<float>(fParams.fPeriodSize) / static_cast<float>(fParams.fSampleRate));
return fSocket.SetTimeOut(static_cast<int>(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) {


Loading…
Cancel
Save