Determine the size of a pipe without calling read()

后端 未结 13 910
无人共我
无人共我 2020-12-19 03:56

I need a function called SizeOfPipe() which should return the size of a pipe - I only want to know how much data is in the pipe and not actually read data off t

相关标签:
13条回答
  • 2020-12-19 04:54

    There is no portable way to tell the amount of data coming from a pipe. The only thing you could do is to read and process data as it comes.

    For that you could use something like a circular buffer

    0 讨论(0)
提交回复
热议问题