Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Feb : Re: OnWork does not fire in Indy10 Delphi 2007

www.cryer.info
Managed Newsgroup Archive

Re: OnWork does not fire in Indy10 Delphi 2007

Subject:Re: OnWork does not fire in Indy10 Delphi 2007
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Tue, 12 Feb 2008 10:52:03

"Moore" <moore@hotmail.com> wrote in message
news:47b1b01d$1@newsgroups.borland.com...

> Again, what event to use if not OnWork to know when a
> TCP server sends a text to the client?

None.  That is not how Indy is designed to be used.

> I am accesing a TCP server i a machine that when a card is removed
> it sends a text command to all clients that are connected, and I want
> to know when that command is sent to perform such operations in the
> client application, in this case the server text is not triggered by a
> client
> petition, the client connects and receives data, some times the server
> may in a certain time sends data..

Then you need to use a timer or a thread to continuously read from the
connection asynchronously.  Depending on what the formatting of the commands
looks like, you might be able to use TIdCmdTCPClient instead (it uses a
thread internally to receive server-issued commands).  Otherwise, you will
have to manage the reading manually.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive