Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Indy10 / D2006 / IdCmdTCPClient / IdCmdTCPServer
| Subject: | Indy10 / D2006 / IdCmdTCPClient / IdCmdTCPServer |
| Posted by: | "Mark Gebauer" (mark.gebau..@gmx.net) |
| Date: | Thu, 6 Apr 2006 22:59:39 |
Hello,
I would like to use an IdCmdTCPClient in combination with IdCmdTCPServer.
The Client should connect to the server, send some commands, and in the
other direction the server should send some commands to the client. But
unfortunately that doesn't work. I'm running into troubles when trying to get
a valid response from the server.
My Client sends a command, for example:
IdTCPCmdClient1.SendCmd('AddChannel CH00', 200);
In the corresponding idCommandHandler on the server side the following code will
be executed:
...
ASender.Reply.SetReply(200, 'OK');
...
Now the client either freezes (waiting for a correct response) or throws an exception
(wrong reply code).
I've found the hint in this newsgroup to use IdTCPClient instead, and it works now okay
for the client => server direction. Can somebody please help me to understand why this
code doesn't work with IdCmdTCPClient? Or are IdCmdTCPClient/IdCmdTCPServer not
able to send commands?
Thanks in advance!
Mark