[Twisted-Python] writing back through open connections

David Welch dwelch at umail.ucsb.edu
Tue Mar 4 12:15:27 MST 2008


Hi,

I'm new to twisted and I am having trouble writing back through open  
tcp connections. In my setup I have many clients (lets say 10 for this  
example) connecting to a server running twisted. Each time a new  
client connects I maintain that connection indefinitely and it  
populates a list of available clients the server can talk to. I want a  
user to select from that list and send data to that client using the  
open connection. In this case a client won't cause an event (so I  
can't just write back to it in say the receivedData function because  
the client is just sitting idle waiting for data to be pushed to it).  
The transport.write() works in the protocol that handles events from  
the clients, but like I said the client will be waiting idle until  
some data is sent to it (it just makes the initial connection to the  
serve). Is there any way to see a list of the open connections so I  
can selectively write to it? Or is there another way to do this?  
Thanks for the help.

Dave




More information about the Twisted-Python mailing list