Simple TCP proxy

Chris Angelico rosuav at gmail.com
Thu Jul 28 08:29:18 EDT 2022


On Thu, 28 Jul 2022 at 21:01, Morten W. Petersen <morphex at gmail.com> wrote:
>
> Well, I was thinking of following the socketserver / handle layout of code and execution, for now anyway.
>
> It wouldn't be a big deal to make them block, but another option is to increase the sleep period 100% for every 200 waiting connections while waiting in handle.

Easy denial-of-service attack then. Spam connections and the queue
starts blocking hard. The sleep loop seems like a rather inefficient
way to do things.

> Another thing is that it's nice to see Python handling 500+ threads without problems. :)

Yeah, well, that's not all THAT many threads, ultimately :)

ChrisA


More information about the Python-list mailing list