Giter Site home page Giter Site logo

Comments (11)

BiagioFesta avatar BiagioFesta commented on May 31, 2024

receive_datagram awaits for receiving the next datagram for the connection.

If the connection is closed during the await, then the async function will returns but with an error Err (instead of the datagram).

This is expected. And how Rust idiomatically handles errors (i.e., Result).

Surely, I need to improve documentation. For now, I limited to the essential for publishing the first version of the library

from wtransport.

redoriental avatar redoriental commented on May 31, 2024

My frontend closes the 'webtransport', and it takes a long 30 seconds for the backend to detect that the 'connection' has been closed.

from wtransport.

BiagioFesta avatar BiagioFesta commented on May 31, 2024

The transport layer of this library currently sets a timeout of 10 seconds.

It means that by using the Connection of this library, the connection will be detected as closed (Timed-Out) in the worst case.

Worst-case means: your front-end interrupts the connection without a "graceful shutdown". For instance, by closing the UDP socket without sending a proper quic-CLOSE frame.

If your front-end properly signals the end of connection, the connection will ends immediately as soon as the udp packet arrives on the endpoint.

from wtransport.

redoriental avatar redoriental commented on May 31, 2024

I understand what you mean. This is also due to the underlying limitations of 'WebTransport,' as it lacks a built-in heartbeat mechanism like WebSocket. Consequently, it requires an active close action to initiate the closure.

from wtransport.

redoriental avatar redoriental commented on May 31, 2024

I believe that future 'WebTransport' implementations will include a heartbeat mechanism.

from wtransport.

BiagioFesta avatar BiagioFesta commented on May 31, 2024

Yes. I am already working on transport configurations in order to:

  • Allow settings the connection timeout.
  • Allow configuring a transparent PING mechanism (this can be done by leveraging the underlying QUIC protocol), in order to keep alive the connection in case of no message exchanged for a long period.

from wtransport.

BiagioFesta avatar BiagioFesta commented on May 31, 2024

Unfortunately, this requires time.

I am working hard on this, but it is more a personal project for now and it takes time :)

from wtransport.

redoriental avatar redoriental commented on May 31, 2024

Don't worry, I believe that in the future, there will be a large number of developers collaborating with you, including myself. However, I am currently attending university, making it difficult for me to fully dedicate myself to this project.

from wtransport.

redoriental avatar redoriental commented on May 31, 2024

How is the progress?

from wtransport.

redoriental avatar redoriental commented on May 31, 2024

How is the progress?

from wtransport.

BiagioFesta avatar BiagioFesta commented on May 31, 2024

New release is out v0.1.2

It includes:

  • Transport settings for keep_alive PING.
  • Transport settings for timeout.
  • New SessionRequest to access HTTP request and decide whether accept or reject

I am closing this issue.

from wtransport.

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.