send_data for arbitrary buffer type #93
Labels
B-rfc
Blocked: request for comments. Needs more discussion.
C-refactor
Category: refactor. This would improve the clarity of internal code.
The buffer type should not be fixed for a connection or stream. It should be a generic parameter of the send_data function, so that each send_data call on the same stream can have a different buffer type.
This is because when h3 is eventually integrated with hyper, hyper will need to send whatever buffer type the response HttpBody has.
The main issue here is tracking the write progress of an asynchronous write operation. With the current API, it is guaranteed that multiple writes can not be running simultaneously, which would result in them being garbled together.
quinn itself uses the following function signature:
The returned Write struct is a future that contains a mutable borrow of the stream.
I don't know if it would be possible to do something similar with the h3::quic traits.
The text was updated successfully, but these errors were encountered: