Topic Path: Symbol Reference > Classes > TIdTCPConnection Class > TIdTCPConnection Methods > GetInternalResponse Method
ContentsIndexHome
PreviousUpNext
TIdTCPConnection.GetInternalResponse Method

Reads response detail lines from a peer connection.

procedure GetInternalResponse; virtual;

GetInternalResponse is a procedure used to read and process RFC-compliant response lines from the peer connection. 

GetInternalResponse implements the processing required for generic RFC-compliant responses. Responses contain a 3-digit response code, an optional continuation marker ('-') or an end marker (CHAR32), and the text associated with the response code. 

GetInternalResponse may be overridden in descendant classes supporting a protocol using response message in a different format or requiring specific processing based on values in the reply. 

The following is an example of the Continue status response defined for the HTTP protocol as both a terminal and a continuation response: 

 

End Marker 
Response 
Yes 
100 Continue 
No 
100-Continue 

 

GetInternalResponse builds a TStringList to store the values read from the connection, and reads one or more reponse lines using the ReadLnWait method for the IOHandler. GetInternalResponse will continue to read response lines until an end marker is found in the most recent response line from the IOHandler

Responses read from the connection are assigned to the formatted reply property in LastCmdResult

GetInternalResponse is used in the overloaded GetResponse method. 

Some servers may send blank lines before the contents of the reply. Some protocols also allow sending out-of-band data in the midst of RFC responses from a server. Descendant classes may need to override this method to account for these situations.

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