Solved

Multi User Chat

Posted on 2004-10-13
14
323 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
Comment Utility
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-
Comment Utility
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
Comment Utility
which part of your "building of user list" doesn't work?
0
 
LVL 2

Author Comment

by:-Karamja-
Comment Utility
Removing the user from the list.
0
 
LVL 14

Expert Comment

by:DragonSlayer
Comment Utility
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-
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Author Comment

by:-Karamja-
Comment Utility
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
Comment Utility
Yea, I guess the logic seems ok.
0
 
LVL 12

Expert Comment

by:Ivanov_G
Comment Utility
> "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
Comment Utility
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-
Comment Utility
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-
Comment Utility
Thanks, Its very good example.
0
 
LVL 2

Expert Comment

by:gangsterboss
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now