[Twisted-Python] Modifying Echo example
Mark Bailey
mebly5343 at gmail.com
Mon Mar 1 12:41:44 MST 2010
Hi Renan:
I asked almost the same question a few weeks ago. Look at
http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#HowdoImakeinputononeconnectionresultinoutputonanother
The factory can access a list of the connections.
Mark
On Mar 1, 2010 2:24 PM, "Renan Mathias Fernandes" <renan at renanfernandes.org>
wrote:
Hello,
I am trying to learn about Twisted Matrix, and for that I am modifying the
Echo Client & Server example to archive few goals:
>From now, I have modified this example to: Make the client send some
requests and have the server reply for each request.
So, for example: if the client sends "Hello!", the server will reply :
"Hello, [ip address of client]".
But my point is: I can handle the communication between 1 server and 1
client only, but how Can I do if I have multiple clients connected?
My objective is: I have 4 clients connected, and I want the server to send a
data to only one specific client (I will provide the ip address and port for
this specific client)
I imagine that The correct way to do this is: having one thread for each
client connection, and calling that specific thread to write down a message,
am I correct?
Does someone has an example on how can I do that?
Thanks in advance,
Renan Mathias Fernandes
_______________________________________________
Twisted-Python mailing list
Twisted-Python at twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20100301/6e564833/attachment.html>
More information about the Twisted-Python
mailing list