Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jul : Re: Sending an unsolicited message from Indy server
| Subject: | Re: Sending an unsolicited message from Indy server |
| Posted by: | "D-Fan" (d-fan@antispam.com) |
| Date: | Fri, 18 Jul 2008 12:29:39 |
When I finish my coding can I get you to review it for a fee?
Remy Lebeau (TeamB) wrote:
> "D-Fan" <D-Fan@antispam.com> wrote in message
> news:487ed92c$1@newsgroups.borland.com...
>
>> I have an Indy client application and an indy server application. There
>> are occasions that I want to send an unsolicited message
>> from the server to the client.
>
> Please go to http://www.deja.com and search the newsgroup archives. This
> has been discussed many times before.
>
>> do I need to use a tcpclient component on the server to do
>> this unsolicited communication?
>
> No. You can send the message using the existing connection. But you have
> to redesign your protocol at the data level to be asynchronous in order to
> support such messages, and you have to use outbound queues on the server
> side so unsolicated messages do not overlap replies to client commands, and
> you can't use SendCmd() on the client side anymore since it may receive an
> unsolicated message instead of a command reply.
>
>> It seems like each client needs to have a tcpserver to receive
>> this communication since this message can be sent at any time.
>
> No, it does not. That would just lead to problems with firewalls and
> routers anyway.
>
>> It doesn't seem feasible to use the existing (primary) tcpserver component
>> to send an unsolicited message to the client PC.
>
> It is feasible, if implemented properly.
>
>
> Gambit