Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : Re: Indy and SSL Woes

www.cryer.info
Managed Newsgroup Archive

Re: Indy and SSL Woes

Subject:Re: Indy and SSL Woes
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Wed, 29 Mar 2006 13:06:42

"Lloyd Kinsella" <lloydkinsella@gmail.com> wrote in message
news:442addbe$1@newsgroups.borland.com...

> Why not?

Because TIdCmdTCPClient and TIdCmdTCPServer are not designed to be used
together.

> It's a TCP client all the same

Perhaps, that is not used like a normal client connection.  TIdCmdTCPClient
is specifically designed to receive commands from a server.  That is not how
clients typically behave.  Internally, TIdCmdTCPClient runs a worker thread
that continuously reads from the socket, and then processes the commands
when received.  TIdCmdTCPServer does the exact same thing, but with a server
socket instead of a client socket.  TIdCmdTCPServer is not designed to send
commands to clients, and TIdCmdTCPClient is not designed to send commands to
a server.  You get into a scenerio where both ends of the connection are
endlessly reading and never writing to each other.  As such, you deadlock
both sides.

That is why you should be using TIdTCPClient with TIdCmdTCPServer -
TIdTCPClient sends commands that TIdCmdTCPServer can respond to.  Likewise,
you should be using TIdTCPServer with TIdCmdTCPClient - TIdTCPServer can
send commands that TIdCmdTCPClient can respond to.

> despite that, even switching to TIdTCPClient makes no difference, I
> still get the same error.

Then your code is likely fundamentally wrong to begin with.  So, AGAIN,
please show your actual code.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive