Skip to content Skip to sidebar Skip to footer

Proper Way To Implement A Direct Connect Client In Twisted?

I'm working on writing a Python client for Direct Connect P2P networks. Essentially, it works by connecting to a central server, and responding to other users who are searching for

Solution 1:

Without knowing all the details of the protocol, I would still recommend using a single reactor -- a reactor scales quite well (especially advanced ones such as PollReactor) and this way you will avoid the overhead connected with threads (that's how Twisted and other async systems get their fundamental performance boost, after all -- by avoiding such overhead). In practice, threads in Twisted are useful mainly when you need to interface to a library whose functions could block on you.


Post a Comment for "Proper Way To Implement A Direct Connect Client In Twisted?"