Internet Direct (Indy) Version 9.0.2 Beta
TIdTCPConnection.WaitFor
Reads data from the peer connection until a string is found.

function WaitFor(const AString: string): string;
Parameters
const AString: string
The value to be located.

Returns
String - Value read from the connection.

Description
WaitFor is a String function used to read from the connection until the value in AString is encountered. The return value for WaitFor will include the value in AString.

WaitFor calls CheckForDisconnect to detect when the connection is closed.