Sever Side Chat Application with Borland Delphi/Indy
This article will get you started on building a chat application based on the client/server model. It will be able to handle all of the basics found in chat applications like Microsoft Messenger and others.
Sever Side Chat Application with Borland Delphi/Indy - The Code (Page 2 of 5 )
The first thing we need to do is create a class that will take the details of every client that connects to the chat. For now we will only take three, the IP address(which will enable you to ban a client if necessary), Nick name and time/date of connection. We also define procedures to send messages, list connected names and files in the same class. Place the following code just below the ‘type’ heading of the form, making sure that it is above the form declaration.