This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, March 8, 2012 12:11:30 AM(UTC)
Groups: Registered
Posts: 16
Hello,
I 'm using a convert object to recieve an udp stream. Problem is that when there is no data I get an error with the function putSourceFile. A non-blocking socket operation could not be completed immediately.
Is there an option to wait forever?
Thanks,
Jelle
#2
Posted
:
Thursday, March 8, 2012 5:07:43 AM(UTC)
Groups: Registered
Posts: 256
Jelle,
If you don't want the code to return until a valid source stream is present (infinite timeout), you can implement your own code to keep it waiting. For example, if you're using C++, the code will look something like this:
HRESULT hr = E_FAIL;
while(wcslen(bstr)>0 && FAILED(hr)) //don't check if the string is zero-length
{
Sleep(1);
hr = m_convert->put_SourceFile(bstr);
}
This code will not return until a valid stream is present in the link specified by the (bstr) string.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.