Internet Direct (Indy)
Home
PreviousUpNext
TIdComponent.EndWork Method

Triggers the OnEndWork event handler.

Pascal
procedure EndWork(
    AWorkMode: TWorkMode
); virtual;
Parameters 
Description 
AWorkMode 
Work mode for the peer connection. 

EndWork is a procedure used to trigger the OnEndWork eventhandler. EndWork maintains the number of reads and/or writes pending for the connection. 

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

 

Value 
Meaning 
wmRead 
The component is reading data from the peer. 
wmWrite 
The component is sending data to the peer. 

 

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

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

Use BeginWork to signal the start of a new level for a specified work mode. 

Use DoWork to signal when bytes for the current work level are handled. 

When WorkTarget is assigned, work mode events are signalled in the TIdComponent identified by WorkTarget instead of the current object instance.

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.