Indy 9
|
TIdMessageClient = class(TIdTCPClient)
TIdMessageClient provides methods and properties needed to handle transmission and receipt of both the headers and the body for an Internet message, including line folding.
property MsgLineFold: string;
property MsgLineLength: integer;
constructor Create(AOwner: TComponent); override;
procedure ProcessMessage(AMsg: TIdMessage; AHeaderOnly: Boolean = False); overload; procedure ProcessMessage(AMsg: TIdMessage; const AStream: TStream; AHeaderOnly: Boolean = False); overload; procedure ProcessMessage(AMsg: TIdMessage; const AFilename: string; AHeaderOnly: Boolean = False); overload;
The default implementation of ProcessMessage uses the IOHandler assigned to the client connection to receive the header and body of the message, and stores data in the message instance specified in AMsg.
The stream-based variant of ProcessMessage creates a TIdIOHandlerStream instance that can be used to load data from the stream specified in AStream into AMsg. The TIdIOHandlerStream instance is freed prior to exiting from the method.
The file-based variant of ProcessMessage creates a TFileStream used to access message data in the file specified by AFilename, and calls the stream-based variant of ProcessMessage to load message data into AMsg. The TFileStream instance is freed prior to exiting from the method.
procedure ProcessMessage(AMsg: TIdMessage; AHeaderOnly: Boolean = False); overload; procedure ProcessMessage(AMsg: TIdMessage; const AStream: TStream; AHeaderOnly: Boolean = False); overload; procedure ProcessMessage(AMsg: TIdMessage; const AFilename: string; AHeaderOnly: Boolean = False); overload;
The default implementation of ProcessMessage uses the IOHandler assigned to the client connection to receive the header and body of the message, and stores data in the message instance specified in AMsg.
The stream-based variant of ProcessMessage creates a TIdIOHandlerStream instance that can be used to load data from the stream specified in AStream into AMsg. The TIdIOHandlerStream instance is freed prior to exiting from the method.
The file-based variant of ProcessMessage creates a TFileStream used to access message data in the file specified by AFilename, and calls the stream-based variant of ProcessMessage to load message data into AMsg. The TFileStream instance is freed prior to exiting from the method.
procedure ProcessMessage(AMsg: TIdMessage; AHeaderOnly: Boolean = False); overload; procedure ProcessMessage(AMsg: TIdMessage; const AStream: TStream; AHeaderOnly: Boolean = False); overload; procedure ProcessMessage(AMsg: TIdMessage; const AFilename: string; AHeaderOnly: Boolean = False); overload;
The default implementation of ProcessMessage uses the IOHandler assigned to the client connection to receive the header and body of the message, and stores data in the message instance specified in AMsg.
The stream-based variant of ProcessMessage creates a TIdIOHandlerStream instance that can be used to load data from the stream specified in AStream into AMsg. The TIdIOHandlerStream instance is freed prior to exiting from the method.
The file-based variant of ProcessMessage creates a TFileStream used to access message data in the file specified by AFilename, and calls the stream-based variant of ProcessMessage to load message data into AMsg. The TFileStream instance is freed prior to exiting from the method.
procedure SendMsg(AMsg: TIdMessage; const AHeadersOnly: Boolean = False); virtual;
Descendant classes may override the default SendMsg behavior to implement protocol specific message transmission requirements.