quiche icon indicating copy to clipboard operation
quiche copied to clipboard

Exposing the number of bytes available to read

Open kixelated opened this issue 2 months ago • 0 comments

There's currently no way to determine how many bytes can be returned by stream_recv.

I'm currently writing an async API on top of quiche and unfortunately, that means allocating on the heap via Vec or BytesMut. With no way of knowing the size upfront, I either have to over-allocate or perform an additional copy (using a temporary buffer to learn the size).

Something like stream_capacity but in the reverse direction would be great. stream_buffered maybe?

kixelated avatar Nov 07 '25 18:11 kixelated