tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

curio-example.rst (538B)


      1 Curio Example Server
      2 ====================
      3 
      4 This example is a basic HTTP/2 server written using `curio`_, David Beazley's
      5 example of how to build a concurrent networking framework using Python 3.5's
      6 new ``async``/``await`` syntax.
      7 
      8 This example is notable for demonstrating the correct use of HTTP/2 flow
      9 control with h2. It is also a good example of the brand new syntax.
     10 
     11 .. literalinclude:: ../../examples/curio/curio-server.py
     12   :language: python
     13   :linenos:
     14   :encoding: utf-8
     15 
     16 
     17 .. _curio: https://curio.readthedocs.org/en/latest/