[Twisted-Python] Advice on starting a project
tard at 2kservices.com
Thu Aug 7 03:00:45 EDT 2003
Wednesday, August 6, 2003, 7:18:53 PM, you wrote:
R> How would I get a list of clients currently connected so that I can send
R> a message from one client to its recipient?
R> Any advice on what to look at and any examples that would be useful?
I'm new to twisted too and work on a similar project now (twisted
on serverside and flash and C# on clientside).
I'm not sure if it's the right way in twisted, but this example
receivs lines from one connection and writes them to all other
from twisted.internet.protocol import Factory
from twisted.protocols.basic import LineReceiver
from twisted.internet import reactor
def connectionLost(self, reason):
protocol = Chat
self.clients = 
[cli.sendLine(msg) for cli in self.clients]
f = MyFactory()
if __name__ == '__main__':
Alexander mailto:tard at 2kservices.com
More information about the Twisted-Python