Comments (2)
User's code (or understanding) should be geared towards the higher level abstraction.
I would recommend sticking with a disposable pattern where the user:
- creates object
- uses object
- 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.
@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)
- estimatedSendRate absent vs null HOT 1
- getStats() being rejected
- Quality of a bandwidth estimate HOT 16
- Allow more aggressive garbage collection HOT 5
- Should the constructor take http3Only or something more transport agnostic? HOT 10
- WebTransportSendStream's abortSignal algorithm doesn't make sense
- No write requests are being rejected on in-flight error HOT 2
- Should all fields in WebTransportConnectionStats be nullable? HOT 2
- Send algos contains normative MAY and SHOULD in non-normative notes
- Clarify what sending "completed" means e.g. wrt. flow control HOT 2
- How should the WebTransport constructor handles timeouts? HOT 5
- serverCertificateHashes really only allow if not pooled? HOT 10
- Remove dependency on "Data Recvd" state HOT 3
- What are "first-strong heuristics"? HOT 2
- WPT tests are needed for serverCertificateHash feature HOT 2
- Working with servers behind a NAT or on a local network (aka "p2p") HOT 2
- Relative URL in WebTransport constructor HOT 1
- Listening to event by event name HOT 6
- Keep connection on tab switch HOT 10
- wt.ready and wt.closed trigger unhandled rejections
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 webtransport.