Topic Path: Symbol Reference > Classes > TIdTCPConnection Class > TIdTCPConnection Methods > GetResponse Method > GetResponse Method (array of SmallInt)
ContentsIndexHome
PreviousUpNext
TIdTCPConnection.GetResponse Method (array of SmallInt)

Retrieves one or more response lines from the connection.

function GetResponse(
    const AAllowedResponses: array of SmallInt
): SmallInt; virtual; overload;
Parameters 
Description 
AAllowedResponse 
Numeric response codes permitted. 

SmallInt - Response from the peer connection.

GetResponse is a overloaded function used to read one or more response from the peer on the the connection, and to verify that the numeric response code is valid for the command context. GetResponse is overloaded to allow specifying one or more response codes (in numeric or string format) that are valid for the response. 

The return value for the methjod is the response read from the peer connection. 

GetResponse calls GetInternalResponse to implement read and processing the response lines in their expected format. 

GetResponse calls CheckResponse to confirm the response is one of the values allowed in the response, and to optionally raise an exception when the conditions are warranted for the protocol in use. 

Use LastCmdResult to access the full text or numeric response number for the most recent response message, or multiple response messages. 

GetResponse is used in SendCmd.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.