Solved

Multi User Chat

Posted on 2004-10-13
14
326 Views
Last Modified: 2010-05-18
Hello,

Im trying to make multi userchat with userlist,
I would like to use TServer/ClientSocket but Indy fine too.

I cant do it, it always seems to go wrong when I try to add userlist to the application.

Can someone make a demo application for me?
Will offer more points.
0
Comment
Question by:-Karamja-
  • 6
  • 5
  • 2
  • +1
14 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 12300638
I guess the experts here will be more willing to participate if you ask in specifics. Since you are facing problems adding users to userlist, well, show us how you have done it, and ask for advice, and I'm sure many experts will be willing to share their views.

As in asking the experts to write a full-fledged application for you, well, most will be reluctant.

Having said that, the Indy components *do* come with a sample client/server chat application... maybe you would like to check it out.



DragonSlayer.
0
 
LVL 2

Author Comment

by:-Karamja-
ID: 12300702
Thanks for your reply, I did look at that Indy demo, Didnt like it at all lol

Ok, What I have so far is;

One App (Server)
Other App (Client)

Any data sent to the Server, The server then sends it to all Clients connected.
This is using TServer/ClientSocket
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 12300818
which part of your "building of user list" doesn't work?
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 2

Author Comment

by:-Karamja-
ID: 12300893
Removing the user from the list.
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 12300944
Show us some code, on how you add users to the list? And why does your user removal work?
0
 
LVL 2

Author Comment

by:-Karamja-
ID: 12301075
When they connect, They send something like
NICK:User1 (User1 being his nick)
Server would then read the NICK: part then send
ADD:User1 to the clients
Clients add User1 to the list.

On quit, Client will send
QUIT:User1
Server reads and sends
DEL:User1

Then the client trys to find User1 in the list, and remove it
But never seems to work,
 - It wont remove it
 - List out of bounds
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 12301095
Karamja, again, please post some code, even the parts that do not work. Otherwise it would be hard for anyone to help you debug. Post the code on how you add the client, and the buggy code on where you want to remove the client.
0
 
LVL 2

Author Comment

by:-Karamja-
ID: 12301124
I can not give code at moment, As im not at the computer with it,

But am I going the right way about what im doing?
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 12301207
Yea, I guess the logic seems ok.
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 12305528
> "Any data sent to the Server, The server then sends it to all Clients connected."

It sound like IRC. You can use Indy components for IRC and "silently" join all clients to e specified channel, where the message is sent to all clients in the channel. You can also implement private chats between 2 clients. All this is supported by IRC. Look at the classes TidIRCServer and TidIRC ...
0
 
LVL 2

Accepted Solution

by:
gangsterboss earned 500 total points
ID: 12333509
i have create a small messanger that allows u to send messages to machine with the app running and it puts the username but u can only send a message to one person at a time

if u would like this messanger look try downloading it from aaronat.50megs.com/http://aaronat.50megs.com/messanger.zip
u will need to disable any firewalls u have runnning. if u have any probles downloadin the file let me know

good luck
gangsterboss
0
 
LVL 2

Author Comment

by:-Karamja-
ID: 12333535
Thanks for reply,

I cant download, Hotlink type thingy.
Could you email to root@k-32.co.uk ?

Thanks
0
 
LVL 2

Author Comment

by:-Karamja-
ID: 12333821
Thanks, Its very good example.
0
 
LVL 2

Expert Comment

by:gangsterboss
ID: 12333842
no problem
u'll have to keep in mind this was a personal messanger that y there are little bit of code that modify the computer eg remove start button

if u  need any more help just ask

good lck
gangsterboss
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question