Topic Path: Symbol Reference > Classes > TIdCommandHandler Class
ContentsIndexHome
PreviousUpNext
TIdCommandHandler Class

Collection item representing command handlers for a server implementation.

File
TIdCommandHandler = class(TIdCollectionItem);

TIdCommandHandler is a TCollectionItem descendant that implements a mechanism for recognizing valid commands for a Server, and provides methods and properties needed handle parameters, perform actions, and formulate error and success responses. 

TIdCommandHandler implements an OnCommand event handler that receives a TIdCommandEvent event type representing the unique command to be executed. TIdCommandHandler implements the virtual Check method that handles creation of TIdCommand object instances, signalling of event notifications for the associated command object, as well as preparation of reply and response values for the associated threaded peer connection. 

TIdCommandHandler is an optional feature for use with TIdTCPServer and descendant classes. TIdCommandHandler can be used when TIdTCPServer.CommandHandlersEnabled indicates that command handlers are desired, and the server has valid TIdCommandHandler instances assigned in the CommandHandlers collection. Under any other circumstance, TIdTCPServer reverts to the default behavior implemented using the TIdTCPServer.OnExecute event handler.

Update to reflect new TIdCmdTCPServer hierarchy.

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