Internet Direct (Indy) Version 9.0.1 Beta
TIdComponent.BeginWork
Used to trigger the OnBeginWork event.

procedure BeginWork(AWorkMode: TWorkMode; const ASize: Integer); virtual;
Parameters
AWorkMode: TWorkMode
Work mode for the peer connection.

const ASize: Integer = 0
Number of bytes to be read or written.

Description
BeginWork is a procedure used to trigger the OnBeginWork event. BeginWork maintains the number of reads and writes pending, and size information for the initial read and write operation.

AWorkMode is a TWorkMode enumerated type, and can contain the values:

ASize is the optional value indicating the number of bytes expected by to be received or sent by the connection.

Calls to the BeginWork procedure can be nested, but the OnBeginWork event handler will be invoked only for the initial call to BeginWork.

Applications must assign a procedure to the OnBeginWork event handler in order to respond to the event notification.