Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, March 8, 2012 12:11:30 AM(UTC)
jvreeker

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
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, March 8, 2012 5:07:43 AM(UTC)

Daoud  
Daoud

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.050 seconds.