TIDTCPCMDServer disabling response

Using TCPCMDServer V10
is there a way to disable a response when client sends a command to TIDTCPCMDServer ?
controlrAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sinisa VukSoftware architectCommented:
try to disable replay with:
IdCmdTCPServer1.CommandHandlers.PerformReplies := False;

Open in new window

0
controlrAuthor Commented:
Sinasa, thanks for the direction!

i started using  asender.PerformReply := False;  per command.  and it seems to work..

However, stating this on every execution seems useless..

is there a way to do one of these  at on formCreate:

svr.CommandHandlers[24].PerformReplies := False;    //trieds this but error

cmdDoSomething.PerformReplies := False;    //trieds this on the actual proc name but error


full points will be awarded if can implement any of the bove (preference for the command name)
0
Sinisa VukSoftware architectCommented:
You sould set PerformReplies as I noticed before - to CommandHandlers (which will then use this for all commands)
svr.CommandHandlers.PerformReplies := False;

Open in new window

0
controlrAuthor Commented:
that code is for overall (you gave it to me at the start) ..
When the app starts, I need to disable specific commands only (not all).
0
Sinisa VukSoftware architectCommented:
then you should assign OnCommand even of TCommand for each command ...

...
aCommand.OnCommand := CommandResponse;
...

Open in new window

....
and set PerformReply := False
procedure TForm1.CommandResponse(ASender: TIdCommand);
begin
  if ASender.Command = '.....' then
    ASender.PerformReply := False;
end;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.