realbasic-nug
[Top] [All Lists]

Re: Some questions and help about CHAT!

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Some questions and help about CHAT!
From: Lance Massey <lmspam at neuropop dot com>
Date: Wed, 31 Aug 2005 07:31:43 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20050830134052 dot 23198D07B18 at lists dot realsoftware dot com> <E9C8AE83-150B-4D83-BA29-A44263D3634D at farhner dot com> <0D067786-2149-4001-8DAE-8EA9DE867C99 at neuropop dot com> <FD665C71-4C16-40DA-9C04-E9092413818E at nosrelo dot it>
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>

<Prev in Thread] Current Thread [Next in Thread>