Skip to content
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

Consider moving hyper's h2 support types to h2 #656

Open
cloneable opened this issue Jan 2, 2023 · 1 comment
Open

Consider moving hyper's h2 support types to h2 #656

cloneable opened this issue Jan 2, 2023 · 1 comment

Comments

@cloneable
Copy link
Contributor

My current project uses h2 directly without hyper negotiated by TLS with ALPN. To support an AsyncRead+AsyncWrite transport on top of an HTTP2 stream I had to write an adapter like hyper's H2Upgraded, which was non-trivial due to buffering and flow-control capacity management.

Now I wonder if you would consider moving the h2 support types from hyper to h2 and expose them, so users of h2 can build binary protocols on top of h2 and even can take advantage of BDP support. I don't believe this would bloat h2 with code unrelated to HTTP2 since it does support upgrading to stream-based protocols.

I know the chance of this is slim, but I had to ask. :)

@vi
Copy link
Contributor

vi commented Apr 10, 2024

There is a similar wrapper at https://docs.rs/mtunnel/latest/mtunnel/struct.Stream.html.

For some strange reason, it issues end_of_stream=true on flush instead of on shutdown though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants