3 ms·
Implementing a Single-Threaded Blocking Bare Bones TCP/IP Server
- kaz-inc 2y agohttps://github.com/kasrasadeghi/pipeline-js/blob/main/kazhttp.py https://github.com/kasrasadeghi/pipeline-js/blob/main/kazhtt... I've implemented something similar for a pet project, trying to make a very concise http(s) server with raw python. It works with bytes for speed and handles a lot of tricky edge cases I couldn't find in other implementations (like request paths that were over 16k bytes long) that I needed for my frontend. It has microsecond-level logging, a packet proxy, and a supervisor, all as separate binaries that interact.