Question

I am trying to use the read stream for downloading some randomly generated data from server.
But the requirement is that the CFReadStream should block untill the buffer is not filled completely.

Is there any way to do this.. There is a similar API in java like readFully() and in windows ReadAll() I want a similar thing in mac/ios as well. Is there any way to achieve the same..

I don't need multiple CFreadStream the strict requirement is that in singleRead will fill all the buffer.. For example if my buffer is of 1 Mb the 1 Mb buffer will fill in a single read..

Était-ce utile?

La solution

Got the solution for my problem using CFSocketNativeHandle and using the read/Write method of socket with blocking flags..

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top