Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Sep : TCPClient problems with ReadResponse

www.cryer.info
Managed Newsgroup Archive

TCPClient problems with ReadResponse

Subject:TCPClient problems with ReadResponse
Posted by:"Chris Conn" (chris_co..@atadefense.com)
Date:Wed, 26 Sep 2007 12:59:22

Hi all.

I am using a TIDTCPClient wih a CMDServer to implement a chat system. The
system sends chat and other file types (record).

On one hand, I have to use TReadResponse attached to the Client to recieve
msgs to the client and parse them (i.e chat text)

On the other hand, when implementing the send record (which works fine if i
leave out the chat handling) the TReadResponse 'hijacks' my data and causes
errors.


I have tried to suspend the rr thread then resume after my RECORD handling
is done. Also I have tried to completely destroy the rr thread then recreate
afterwards to no avail.

Here are a few relevant snippets:
var   rr: TReadResponse = nil;

On connect:
rr:= TReadResponse.Create(IdTCPClient);


On Disconnect:
rr.Terminate;

            rr.WaitFor;

            FreeAndNil(rr);

================

Any thoughts on how I can mix the 2 or a method that can handle my problem?

I see posts referring to message queues... is that the right direction? If
so where can I get schooled on it?


Is it me or are the INDY help files useless? If I just wanted Class Defs,
I'd look at the source.

Thanks a ton!
Chris Conn
Chris_Conn@ATADefense.com

Replies:

www.cryer.info
Managed Newsgroup Archive