Comments (5)
Let me know if #1873 suits your requirements. Particular points of interest are &mut self
and the non-idempotent behavior.
from quinn.
What's the difference between waiting for a reset and reading? Can you link the spec for the WebTransport API you're referring to?
from quinn.
Based on this: https://w3c.github.io/webtransport/
There is a WebTransport
object. It can create streams, which are represented via
WebTransportSendStream
that extendsWritableStream
, andWebTransportReceiveStream
that extendsReadableStream
There are no relevant methods in the subclasses, so we can focus on the base classes: WritableStream
and ReadableStream
.
ReadableStream
allows getting a ReadableStreamReader
, which is either a ReadableStreamDefaultReader
or ReadableStreamBYOBReader
- but both include ReadableStreamGenericReader
.
The ReadableStreamGenericReader
has a readonly attribute Promise<undefined> closed;
- which in turns allows awaiting for the stream to close without actually reading it (as I understand it). Upon getting an RESET, the promise returned by closed
would reject with a WebTransportError
, which would contain the error code.
This is what I find missing in the quinn
API.
Maybe I am misinterpreting my findings in the Web API, but then I need some tips on the topic of implementing this - but it seems like the Web API for WebTransport does have an API that can't be (simply) built on top of quinn
.
from quinn.
I find the web spec difficult to read (lots of circular definitions that don't actually specify anything useful), but the general idea you describe seems to make sense, and I don't oppose having such an API, even though its use may be niche. Our existing SendStream::stopped
is similar.
from quinn.
Yep, SendStream::stopped
covers it for the send streams, it is only the reading streams that don't have a matching counter part for that.
web spec difficult
Yeah, it is. I am not specializing on dealing with w3c stuff, had to dig through this just for the cross platform WebTransport, and it was veery tricky to spot this API even existing.
from quinn.
Related Issues (20)
- 0-RTT packets can be lost due to race condition introduced along with Incoming HOT 1
- Debug formatting could be improved HOT 1
- GSO padding has high overhead for application datagrams larger than half MTU
- Consider more aggressive GSO batching
- stream sending buffer size and how much left HOT 3
- ECN interop failures HOT 3
- aggressive open_bi HOT 1
- Create my own AsyncUdpSocket HOT 1
- "SendableFrames was SendableFrames { acks: false, other: true }, but only ACKs have been written" HOT 11
- Black hole detection false-positives HOT 5
- Expose Packet Decoder? HOT 2
- ReadExactError::FinishedEarly byte count is sometimes incorrect HOT 1
- How to receive data in blocking way HOT 3
- Inconsistent documentation on platform availability of `local_ip` HOT 3
- long running bi stream HOT 5
- seems like quinn 0.11 not working well under heavy load HOT 12
- build fails on Solaris HOT 1
- Rotation of Connection IDs HOT 5
- How to run insecure connection example? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quinn.