And how do I create the rooms? I mean, I think there must be a
command like "<cmd>newroom</cmd><room>RoomName</room>#END" and then
another one for a client to connect to it.
Am I right?
Can you please explane me this part?
"if mConnections.value(mConnections.key(i)).room = self.room then"
and send the message only to people in your room.
I didn't understand if what...
Thank you
Nick
Il giorno 31/ago/05, alle ore 14:31, Lance Massey ha scritto:
Creating the id is up to you. In my application each user is
assigned an id when they first join gorillapop, so I use that. But
you can use anything -- *so long as it's unique* (an easy one is
the use str(microseconds))
Rooms and usernames will also be up to you. The easiest way would
be to make them a property of "Connection" in the server and modify
the "SendAll" method by adding a line like: "if mConnections.value
(mConnections.key(i)).room = self.room then" and send the message
only to people in your room.
Next you can start creating your own chat protocol sending messages
like "<room>RoomName</room><UserId>id</UserId><msg>Put user message
here</msg>#END
Each Little Client can then strip that apart and display accordingly.
HTH,
L
********************************************************
GorillaPop - Connecting People Through Music
http://www.gorillapop.com/
On Aug 31, 2005, at 3:00 AM, Niccolo Zapponi wrote:
Ok, LAnce.
I understood the little Server / Client app, except for one thing:
how does it give the ID to each connection? Is that the uptime of
the server computer when the socket has been created?
After that, how can I manage usernames and Private chats?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|