Topic Path: Symbol Reference > Classes > TIdIOHandler Class > TIdIOHandler Properties > OnWork Event
TIdIOHandler.OnWork Event

Event handler for buffered read and write operations.

property OnWork;

OnWork is a public TWorkEvent property in TIdIOHandler that is the event handler signalled when a read or write method is called for the IOHandler. OnWork is generally used to control the update of progress indicators or GUI components. 

The work mode indicates the operation performed and the notification sent to OnWork, and can contain one of the following values: 


The component is reading data from the peer. 
The component is sending data to the peer. 
Indicates the number of bytes affected by the operation sent to OnWork. 


The OnWork event handler is triggered when a notification message is received as data is removed from the internal buffer for the IOHandler, and when data is written to the destination for the IOHandler connection. 

Applications must assign a procedure to the OnWork event handler to allow responding to the event notification. 

Use OnWorkBegin to respond to the initiation of a read or write request. 

Use OnWorkEnd to respond to the completion of a read or write request.

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