-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to pause one stream on receive data from server #1600
Comments
Hi, how about check stream ID before pause it?
according to the document:
|
Hi, I have modified examples/libevent-client.c to test this and I think it works. readcb:
on_data_chunk_recv_callback:
|
Thanks for your quick response! But if there are more than one steam are transfering, if the nghttp2_session_mem_recv is return, will other streams been also paused?
|
Hi @nevinguo, |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
The device has very limited memory, so we can not download all the response together, we need to pause some stream and resume it later.
For exampele, we play audio on device, we can not download all the audio, need to do it in a streaming way.
We set a ringbuffer to cache the data, if the ringbuffer is full, we need to pause the download of the audio stream, but we cannot block nghttp2_on_data_chunk_recv_callback function to avoid affect other streams.
if the ringbuff is not full, we notify the nghttp2 session to resume the stream.
The text was updated successfully, but these errors were encountered: