Coder Social home page Coder Social logo

Comments (8)

ravenblackx avatar ravenblackx commented on August 20, 2024

Ah, apparently this is already fixed, I just needed to be on the new version!

from aioquic.

ravenblackx avatar ravenblackx commented on August 20, 2024

Ah, no, it's not fixed, I just mistakenly did (echo && sleep 1 && echo) | h3_request in a context where h3_request took more than a second to start up so there ended up being no async delay.

from aioquic.

jlaine avatar jlaine commented on August 20, 2024

I suggest you take a closer look at the http3_client.py example from which your code seems derived. The issue here has nothing to do with sleeping, your client is not sending its HTTP request and eventually times out.

You're missing the call to self.transmit() to actually send the bytes out to the network:

self.transmit()

See:

https://aioquic.readthedocs.io/en/latest/asyncio.html#aioquic.asyncio.QuicConnectionProtocol.transmit

from aioquic.

ravenblackx avatar ravenblackx commented on August 20, 2024

In that case isn't there just the opposite bug - if you remove the short sleep it does send the request and get the response even though self.transmit is not called?

from aioquic.

jlaine avatar jlaine commented on August 20, 2024

In that case isn't there just the opposite bug - if you remove the short sleep it does send the request and get the response even though self.transmit is not called?

The behaviour is just not defined if you don't call transmit() yourself after queuing data: transmit() can be triggered by receiving data from the server or a timer going off.

from aioquic.

ravenblackx avatar ravenblackx commented on August 20, 2024

Thanks for the explanation, and sorry for the incorrect noise!

from aioquic.

jlaine avatar jlaine commented on August 20, 2024

It's not noise, the feedback is welcome. It made me realise that even though the quic (sans IO) layer is reasonably explicit about how it should be used, the asyncio layer is not, much less the interaction with the h3 layer. I think I'll open an issue on this. Would you mind reviewing a proposal for additional docs?

from aioquic.

ravenblackx avatar ravenblackx commented on August 20, 2024

Cool, improved docs are always good. I would suggest that documenting it in transmit might not be the most helpful though - a mention in each of sendData, sendHeaders etc. would be more discoverable. (The problem for me was that I didn't even know the transmit function existed.)

from aioquic.

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.