twisted-example.rst (620B)
1 Twisted Example Server 2 ====================== 3 4 This example is a basic HTTP/2 server written for the `Twisted`_ asynchronous 5 networking framework. This is a relatively fleshed out example, and in 6 particular it makes sure to obey HTTP/2 flow control rules. 7 8 This server differs from some of the other example servers by serving files, 9 rather than simply sending JSON responses. This makes the example lengthier, 10 but also brings it closer to a real-world use-case. 11 12 .. literalinclude:: ../../examples/twisted/twisted-server.py 13 :language: python 14 :linenos: 15 :encoding: utf-8 16 17 18 .. _Twisted: https://twistedmatrix.com/