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

Checks for a valid response code from the connection.

function CheckResponse(
    AResponse: string; 
    AAllowedResponse: string
): string; virtual; overload;
Parameters 
Description 
AResponse 
Response to find.
 
AAllowedResponse 
Response 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 string value in AResponse and AAllowedResponse. If the responses match, or AAllowedResponse contains an empty string, the response is allowed. If the responses do not match, 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.