Code Monkey home page Code Monkey logo

Comments (2)

amithilbuch avatar amithilbuch commented on August 19, 2024

User's code (or understanding) should be geared towards the higher level abstraction.
I would recommend sticking with a disposable pattern where the user:

  1. creates object
  2. uses object
  3. disposes (closes) object

regardless of what transpires, the user should still be disposing of the object when it is done.
The current details that a failed connection is unrecoverable and optimization around freeing resources when that happens, should not impact this pattern.
In this case, i would say close() should transition the object state from failed to closed.

from webtransport.

shampson avatar shampson commented on August 19, 2024

@amithilbuch Currently the spec doesn't say anything about freeing resources.

Changing the state to "closed" sounds good to me. If the transport is in the "failed" state it can't send any more CONNECTION_CLOSE frames, so I think these steps should be skipped in this case:

An endpoint that receives a CONNECTION_CLOSE frame
MAY send a single packet containing a CONNECTION_CLOSE frame before
entering the draining state, using a CONNECTION_CLOSE frame and a
NO_ERROR code if appropriate. An endpoint MUST NOT send further
packets, which could result in a constant exchange of
CONNECTION_CLOSE frames until the closing period on either peer
ended.

https://tools.ietf.org/html/draft-ietf-quic-transport-19#section-10.3

from webtransport.

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.