A Brief Look at Indy
(Page 1 of 4 )
In this second article in a three-part series, we will discuss the Indy suite, a component which can be used for building an IRC client in Delphi. We will examine its capabilities and determine the minimum level of functionality needed for an IRC client.
In the last article we discussed the Internet Relay Chat protocol and its implementation as defined by RFC1495. We also looked at a few of the commands that are used in an IRC client implementation. In this article we are going to look at how we can use Delphi to build an IRC client.
Delphi in itself does not have a native component that we can use for this purpose. Instead it comes with a group of third party Internet components called Indy (Internet Direct). This suite of components provides us with the means to implement an Internet Relay Chat client application with ease. I will be using Indy version 10.1.5.
Keep in mind that we aim to create an IRC client. A client by its very nature is designed to make a request to a server; this is the very function of a client server model. The server replies to the client according to the rules that are set out in the protocol. So the functions and procedures that we will use in the client application will for the most part deal with receiving and processing responses from the server. For example, when another client on the network joins a channel, we should receive some notification of that event. When we do receive it, we simply add it to a memo component.
It would be wrong of me to state that the client merely responds to whatever the server sends to it. This is not always true; the client can also solicit a response from the server, particularly when it first connects and in many other circumstances. The component that we are going to use to create an IRC client is called the "idIRCclient." It is available from the Indy Clients tab. So let's take a look at how much of the IRC protocol this component implements.
Next: idIRCclient Component Properties >>
More Delphi-Kylix Articles
More By Leidago