forked from hyperium/h3
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make SendStream allow writing arbitrary data like io::Write
This changes the `quic::SendStream` trait to closer mimic the `AsyncWrite` trait, but using a `impl Buf` rather than `&[u8]` which removes the need to allocate and copy the byte slice to store it if needed. [s2n-quic::SendStream](https://github.com/aws/s2n-quic/blob/bf20c6dd148153802929a2514b444dcf5dd37fd1/quic/s2n-quic-h3/src/s2n_quic.rs#L364) uses this to enqueue the bytes for sending, which would require allocating if `&[u8]` was used. Issue hyperium#78 discusses this API change which would remove the need for intermediate buffering. See: hyperium#78 (comment)
- Loading branch information
1 parent
cc7dea2
commit 7f2bc2d
Showing
8 changed files
with
160 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters