Topic Path: Symbol Reference > Classes > TIdComponent Class > TIdComponent Methods > EndWork Method
ContentsIndexHome
PreviousUpNext
TIdComponent.EndWork Method

Triggers the OnEndWork event handler.

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.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.