Internet Direct (Indy) Version 9.0.1 Beta
TIdEcho.Echo
Sends and receives echo data.

function Echo(AText: String): String;
Parameters
AText: String
Data to send to the echo server.

Returns
String - Data received from the echo server.

Description
Echo is a String function that sends the text in AText to the echo server, and returns the text received from the echo server. If the returned value is not the same as the text in AText, there may be a problem with the server or the TCP connection.

Echo monitors the time needed to send the echo request and receive the echo response, and stores the elapsed time in EchoTime. Echo uses GetTickCount, from IdGlobal.pas, to retrieve both the starting and ending milliseconds measurements used to determine EchoTime. Echo can account for TickCount reverting to a 0 (zero) value after starting the Echo transmission.