Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Oct : Re: CommandHandlers - Indyv9
| Subject: | Re: CommandHandlers - Indyv9 |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 5 Nov 2007 10:59:56 |
"RandomAccess" <Not@TellingYou.com> wrote in message
news:472ebe8b@newsgroups.borland.com...
> I am using Indy 9 and would like to know how something similar
> can be achieved in this version.
The CommandHandlers are specific to TIdTCPServer in Indy 9. Short of
re-writting Indy's source code, you can't use CommandHandlers on the client
side unless you upgrade to Indy 10.
> Basically, what I would like to do is to have the server
> broadcast a message out to the clients when data is available
> for them.
TIdTCPClient does not have that functionality built in. You would need to
create and run a separate thread that continuously reads from the
connection, processing whatever data arrives and then sending notifications
to the rest of your application when needed. The same principle is used by
TIdTCPServer (and TIdCmdTCPClient) internally.
> I was thinking of having the clients poll the server with a
> simple CMD instead.
That is another option, though would require more bandwidth, and would not
be as real-time as a broadcast.
Gambit