-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
streams: method access underlying quinn stream behind feature
- Loading branch information
1 parent
1211168
commit cd89dc3
Showing
3 changed files
with
57 additions
and
0 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
cd89dc3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Should I be able to just use these
quinn::RecvStream
/quinn::SendStream
instead of the wrapped ones? I am asking because they expose some nicer lower level API, and I have a code that has to multiplex between usingquinn
/wtransport
which currently usesAsyncWrite
/AsyncRead
- but with this I could switch to using more optimal lower-level stuff!As I understand, the WebTransport itself does not do anything to the individual streams (i.e. no handshake per stream) - but there is a certain protocol-level communication happening over a hidden QUIC stream. Thus using the QUIC streams obtained through this API should just work.
cd89dc3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
WebTransport protocol requires some "initialization" logic on the QUIC streams. That part is internally handled in the core-engine of
wtransport
.That means
quic_stream
andquic_stream_mut
methods are totally safe from the protocol point of view, and accessing the raw quic stream is ok for objectsSendStream
andRecvStream
.This should provide some flexibility for underlying API, such requested here: #41
On the other hand, I don't want to bind to a specific implementation (in this case
quinn
), as the QUIC backend might change in the future ofwtransport
(e.g., powered by multiple backend), and that's why those method are behind a feature.