質問

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..

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top