Internet Direct (Indy)
Home
PreviousUpNext
TIdMessageClient.ProcessMessage Method (TIdMessage, TIdStream, Boolean)

Receives and processes message headers and contents into a TIdMessage instance.

Pascal
procedure ProcessMessage(
    AMsg: TIdMessage; 
    AStream: TIdStream; 
    AHeaderOnly: Boolean = False
); overload;
Parameters 
Description 
AMsg 
Message to receive header and contents.
 
AStream 
Stream containing headers and contents to be loaded.
 
AHeaderOnly 
Retrieve message headers only. Default is False. 

ProcessMessage is an overloaded method in TIdMessageClient that implements receiving and processing of message headers and contents from a file with the contents of the Internet message. 

ProcessMessage ensures that the IOHandler for the message client is assigned and initialized for the operation. 

The stream-based variant of ProcessMessage creates a TIdIOHandlerStream instance that can be used to load data from the stream specified in AStream into the message specified in AMsg. The IOHandler is opened prior to receiving the headers or body content in the Internet message. The TIdIOHandlerStream instance is freed prior to exiting from the method. 

AHeaderOnly indicates that the message client will retrieve only the headers for the message, and will not populate the contents of the message body. The default behavior (when AHeaderOnly is False) is to retrieve the entire message including both header and body contents. 

ProcessMessage does not make any assumptions about the contents of the TIdMessage instance in AMsg. In other words, ProcessMessage does not call TIdMessage.Clear before receiving header or body content. The application must call TIdMessage.Clear when reusing a TIdMessage instance for message retrieval.

TIdMessageClient.ProcessMessage 

TIdIOHandler 

TIdIOHandlerSocket 

TIdIOHandlerStream 

TIdMessage

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.