I'm using a synchronous wininet request and calling InternetReadFileEx()
with the IRF_NO_WAIT
flag, but the function still blocks waiting for data. Why is that?
views:
267answers:
3
+1
A:
In the MSDN docs, the meaning of IRF_NO_WAIT
is described as:
Do not wait for data. If there is data available, the function returns either the amount of data requested or the amount of data available (whichever is smaller).
Mysteriously, it leaves the case where there is not data available undefined. Apparently, if there is no data, it blocks until there is some.
chaos
2009-06-20 21:38:50