Internet Direct (Indy)
Home
PreviousUpNext
TIdEcho Class

Implements a TCP-based Echo client.

Pascal
TIdEcho = class(TIdTCPClientCustom);

TIdEcho is a TIdTCPClientCustom descendant that implements the TCP-based variant of the Echo Protocol as described in the Internet Standards document: 

RFC 862 - Echo Protocol  

TIdEcho is useful as a debugging and measurement protocol where the data sent to the server is simply sent back to the originating client. TIdEcho is provided as a measure of the time it takes to send and receive data from an Echo Server (TIdECHOServer). 

The TCP-based implementation of the Echo Protocol is a connection based application. An Echo Server listens for TCP connections on TCP Port 7. 

When a connection is established, any data received by the server is returned to the originating client. The connection remains open until the client application closes the connection. 

To use TIdEcho, perform the following actions in your application: 

 

Set values in the Host and Port properties, as required. 
Call Connect to open a connection to the Echo Server. 
Call Echo to send data to the server and receive the server response. Use EchoTime to retrieve the number of milliseconds needed to send and receive data from the server. 
Call Disconnect to close the connection to the Echo server. 
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.