Internet Direct (Indy)
|
Reads data from the connection into the specified stream.
procedure Capture( ADest: TIdStream ); overload;
Parameters |
Description |
ADest |
Type is TIdStream. |
Capture is an overloaded procedure used to read data from the connection for the IOHandler into the destination specified by ADest. If ADest contains an unknown or uninitialized data type, an EIdObjectTypeNotSupported exception with the message RSObjectTypeNotSupported will be raised. The overloaded methods provide support for both TIdStream and TIdStrings as the data type for ADest.
Capture triggers the OnWorkBegin event handler with wmRead mode before reading data from the connection. Capture calls ReadLn to retrieve data from the connection until the delimiter specified in ADelim is received. Each line is written to ADest upon receipt. Capture triggers the OnWorkEnd event handler with wmRead mode when all data has been captured from the connection.
Capture is used in the implementation of various protocol-oriented clients, like TIdIMAP4 and TIdNNTP.
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. |