Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Oct : OnBeforeCommandHandler - Indy v9
| Subject: | OnBeforeCommandHandler - Indy v9 |
| Posted by: | "Jamie Dale" (jamie.da..@yahoo.com) |
| Date: | Sun, 28 Oct 2007 22:53:34 |
Hi
I need to send an entire command with parameters in one WriteLn.
Basically something like WriteLn(<command><rest of text/parameters>);
Like this: WriteLn('adduser Joe');
Now, here is my problem. I can send a command and the commandhandler appears
to accept the command by itself.
What about parameters?
My initial thought was to use OnBeforeCommandHandler, to strip the params OR
extract the command. The only snag is this:
procedure TForm1.IdTCPServer1BeforeCommandHandler(ASender: TIdTCPServer;
const AData: String; AThread: TIdPeerThread);
As you can see, the command/data is a constant and thus I can't change it to
pass it back for the commandhandler!
Any ideas please?