-
Notifications
You must be signed in to change notification settings - Fork 50
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
API design #126
Comments
Regarding the first section:
In QUIC (and WebTransport in general), creating and receiving streams is subject to backpressure. Thus, receiveStreams() returns a ReadableStream of ReceiveStream, since ReadableStream is a Web primitive for backpressure. Unfortunately, we couldn't make sendStreams() a WriteableStream of SendStream, since the SendStream object itself has to be created internally, and making sendStreams() a WriteableStream would require the SendStream to be created outside. Thus we settled for a somewhat asymmetric approach that's currently in the draft. Regarding the second section:
This doesn't really work in WebIDL, since Regarding the third section, I've left the reply in #54. |
This one appears answered. Some calls for symmetry should be covered in #40. |
Hi forks.
I have some comment/question/proposal for overview of API design.
unidirectional
createSendStream()
will returns SendStreamthen why
transport.receiveStreams()
doesn't return ReceiveStream ?IIUC, IncomingStream has ReadableStream, so if returns IncomingStream enough for reading.(and ReceiveStream is IncomingStream). And it returns single stream at once.
And this API is sync, because this returns uni-stream which already on transport.
But make it async can be cover receiving uni-stream initiated from server in the future.
finally I would be
bidirectional
At first, BidirectionalStream includes Outgoing/IncomingStream
But Unidirectional uses Send/ReceiveStream which are includes them.
And if some capability will added to Send/ReceiveStream, should also added to BidirectionalStream. So it should be natural for me to
And here
receiveBidirectionalStreams()
meanscreateReceiveStreamOfBidirectionalStream()
.So in same reason above, it can return ReceiveStream
And what is the reason for only receive are accepted if server initiate bi-directional stream ?
Client can write to client initiated bi-directional stream will be
And if this returns promise which will resolve when client initiate bi-stream in the future.
datagram
As I mentioned in #54 (comment) send/receive is weird.
#54 (comment) seems fine.
The text was updated successfully, but these errors were encountered: