Solved

Multi User Chat

Posted on 2004-10-13
14
325 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi procedure  - Unsatisfied forward or external declaration. 2 161
Delphi inherited method 6 70
RESTRequest Parameter 4 31
MS Access from Delphi 31 30
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 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