Coder Social home page Coder Social logo

Comments (5)

Ralith avatar Ralith commented on June 27, 2024 2

Let me know if #1873 suits your requirements. Particular points of interest are &mut self and the non-idempotent behavior.

from quinn.

Ralith avatar Ralith commented on June 27, 2024

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.

MOZGIII avatar MOZGIII commented on June 27, 2024

Based on this: https://w3c.github.io/webtransport/

There is a WebTransport object. It can create streams, which are represented via

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.

Ralith avatar Ralith commented on June 27, 2024

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.

MOZGIII avatar MOZGIII commented on June 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.