hyperium / h2

HTTP 2.0 client & server implementation for Rust.
MIT License
1.38k stars 278 forks source link

[HELP] 65536 byte limit #523

Closed Tonyce closed 3 years ago

Tonyce commented 3 years ago
截屏2021-03-12 下午8 20 10

How can i solve it

seanmonstar commented 3 years ago

h2 doesn't manage flow control automatically, you need to say when you're ready for more data.

Possibly something as simple as body.flow_control().release_capacity(buf.len()), but the option is there to not release capacity if you want to force the remote to pause or slow down.

Tonyce commented 3 years ago

@seanmonstar Thanks for your help, as you said, I did the same thing in the code, but it did not meet my expectations

my code here:

https://github.com/Tonyce/tokio-h2-grpc/blob/main/src/main.rs#L75-L86

this confuses me.