# xStreamBufferReceive in docs

**URL:** <https://forums.freertos.org/t/xstreambufferreceive-in-docs/15286>\
**Category:** Kernel\
**Tags:** tutorial\
**Created:** [June 18, 2022, 8:17am UTC](https://forums.freertos.org/t/xstreambufferreceive-in-docs/15286 "2022-06-18T08:17:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreiCherniaev](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/andreicherniaev/32/573_2.png) [@AndreiCherniaev](https://forums.freertos.org/u/AndreiCherniaev)\
**Post date:** [June 18, 2022, 8:17am UTC](https://forums.freertos.org/t/xstreambufferreceive-in-docs/15286/1 "2022-06-18T08:17:35Z")

</div>

There is description of xStreamBufferReceive in [doc](https://www.freertos.org/xStreamBufferReceive.html):  
“If xBufferLengthBytes is 10, the stream buffer contains 0 bytes when xStreamBufferReceive() is called, **xTicksToWait is 100** ”

And there is code example below:  
“const TickType\_t **xBlockTime = pdMS\_TO\_TICKS( 20 );**”

I suggest rewrite code example. It should contains **100** from description, not 20. Of cause 20 ms may be 100 ticks… But this is very simple example. And this example should be the most friendly, isn’t it?

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [June 21, 2022, 5:12am UTC](https://forums.freertos.org/t/xstreambufferreceive-in-docs/15286/2 "2022-06-21T05:12:29Z")

</div>

I do not think the text and example are necessarily that tightly related. The text in the description of return code is trying to explain the behavior when data is received before the timeout expires. The example just shows how to invoke this API.
