[Twisted-Python] Simple PB Example
Koen Bok
twisted at koen.nu
Mon Dec 25 09:56:05 MST 2006
Dear all,
Happy christmas!
I am trying to get the hang of Twisted and while the documentation is
pretty clear I cannot figure out some basic things. I tried to build
a little project to practise. I would love some hints, and I am not
afraid to read.
Basically I want to write a simple server (Public Broker) which keeps
a list of all connected clients. When one client sends a message to
the server, I want the server to relay that message to other specific
clients, but only those (yes basically an IM server).
So let's say I have a server and three clients:
server: Hello, I am here!
client #1: Yep, me too can I connect, I'm a girl?
server: Sure, I'll add you to my clients list!
client #2: Can I go too, I'm a guy?
server: Yep, you are client number two on my list...
client #3: Me too, me too, I am a guy!
server: Fine, but now let's do some stuff...
client #2: Server, can you please tell all clients that are girls
that I'd like to see em after this session?
server: Let's find out who are female clients in my list and send
them the message. Consider it done!
client #1: Thanks for the message, I'll see if I have time...
In the end client #2 would date client #1...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20061225/5226e626/attachment.html>
More information about the Twisted-Python
mailing list