1. Server - client example using a thread

Delphi client server example in Indy

Delphi Indy server client example on how to make a listener thread for IdTCPClient, how to send a text message to server and how to safely update the VCL such as TMemo. In this example IdTCPServer listens for incoming connections and a message, then sends a response string and safely updates the status for OnConnect, OnDisconnect, OnExecute and more. Both server and client are placed on the same form.

2. Server - client chat example using a timer

Using timer for Indy server client communication

Delphi Indy server client example explains how to send and receive string messages using a timer. This example shows how to use the timer instead of threads to send and receive messages.

3. Server - multiple clients

Working with server and multiple clients

These examples demonstrate the use of multiple clients connected to a main server. This example also shows how to send messages to all clients, receive messages, list and count all connected clients.

4. Send - receive files and records

Sending and receiving files and records using Indy components

Indy example on how to send and receive files and records using Indy TCPServer and TCPClient. This example also shows how to send a file name and how to read and write streams. Full source code.

5. UDP chat example

Sending and receiving UDP messages using Indy components

Delphi UDP server client example. This sample shows how to work with IdUDPClient and IdUDPServer components, how to send, broadcast and read Unicode messages between server and client.