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

Checks for valid response(s) in an array of allowable responses.

function CheckResponse(
    AResponse: SmallInt; 
    const AAllowedResponses: array of SmallInt
): SmallInt; virtual; overload;
Parameters 
Description 
AResponse 
Response to find.
 
AAllowedResponses 
Responses allowed. 

SmallInt - Response encountered, or an empty string.

CheckResponse is an overloaded SmallInt function used to check the response for a command issued to the peer connection to ensure that it is an allowed response. 

CheckResponse compares the value in AResponse to each of the values in AAllowedResponses. If AResponse is found in AAllowedResponses, the response is allowed. If AResponse is not found, RaiseExceptionForLastCmdResult is called. 

The return value for the method is the value in AResponse. 

CheckResponse is used in GetResponse.

CheckResponse 

GetResponse

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