[Twisted-Python] A tcp server that handles many connections

Johann Borck johann.borck at densedata.com
Fri May 19 06:58:34 EDT 2006


Deillon Thomas-WTD008 wrote:

> I will maybe be give more information.
> What I wanted to do for the moment is to begin, a server and two clients.
>  
> Each client open a connection with the server and wait.
> The server, send "client1" to the client 1 waiting a random
> time between each sending
>   and the same thing with the client 2.
>  
> The final aim is to send different information to each client. The
> information will be given by a other processus via a pipe or something
> like this.
>
First of all, yes, twisted is what you're looking for,
Here the basics are explained,  it really helps a lot to read them
carefully, many questions you might and will have are explained along
with the underlying concepts of event-based/async programming, which are
important to understand to use twisted correctly:
http://twistedmatrix.com/projects/core/documentation/howto/index.html

you find examples here, and there are many in the download/checkout itself:
http://twistedmatrix.com/projects/core/documentation/examples/index.html

and if you're looking for "real world" apps using twisted... uups can't
find that page right now (does it still exist?) ahem, look at divmod.org :)

Johann




More information about the Twisted-Python mailing list