Topic Path: Symbol Reference > Classes > TIdCmdTCPClient Class > TIdCmdTCPClient Properties > CommandHandlers Property
TIdCmdTCPClient.CommandHandlers Property

Collection for TIdCommandHandler instances implemented in the client.

property CommandHandlers: TIdCommandHandlers;

CommandHandlers is a TIdCommandHandlers property used to maintain a collection of TIdCommandHandler instances implemented in the client. CommandHandlers implements the HandleCommand method that allows execution of recognized commands using data received in TIdCmdTCPClientListeningThread for the client. 

CommandHandlers is created when the TIdCmdTCPClient is initialized, but applications must add TIdCommandHandler instances to the CommandHandlers collection. The CommandHandlersEnabled property must also be set to True to allow use of the command handlers during execution of the listening thread. 

Assign procedures to OnBeforeCommandHandler and OnAfterCommandHandler event handlers to allow the client to perform operations before or after command handler execution. 

CommandHandlers is freed when the TIdCmdTCPClient destructor is called.

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