Internet Direct (Indy) Version 9.0.1 Beta
|
function Check(const AData: string; AThread: TIdPeerThread): boolean; virtual;
Check creates a TIdCommand object instance used to represent the command handled by the command handler, and sets property values including the CommandHandler that created the object and the peer thread used for data and response messages.
Check parses parameter values into the TIdCOmmand object when ParseParams is True.
Check assigns the values in ReplyNormal as the default reply for the TIdCommand associated with the command handler.
Check signals the OnCommand event handler to allow execution of actions for the command.
If an exception occurs, Check updates the Reply from the command object to contain the value in ReplyExceptionCode and exception message text. Exception messages are then written to the peer thread connection.
When the command object completes execution, values in Reply and Response are sent to the peer thread connection. If Disconnect is True, the peer thread connection is closed prior to exiting from the method.