Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Dec : Re: TIdTCPClient / how to implement something like OnReceiveData event?

www.cryer.info
Managed Newsgroup Archive

Re: TIdTCPClient / how to implement something like OnReceiveData event?

Subject:Re: TIdTCPClient / how to implement something like OnReceiveData event?
Posted by:"Mike Williams (TeamB)" (mlwi!!ia..@gmail!.com)
Date:31 Dec 2007 11:20:30

Unspoken wrote:

> Ok I understand and this works fine in the situation when Client1
> sends something to the Server and awaits for the imediate replay.
> But what if the other Clients sends something to the server and the
> Client1 is also interested in the Server replay?
>
> How should I implement such situation and do not hang my application?

I'm sure others can offer better solutions but one thing to consider is
building both a client and a server into the same application. A server
generally listens for clients to make a request and sends a response
back to the client. Your central server could listen for client
requests.  Once such client request could be an indication that the
client is interested in receiving replies to other clients. The client
would then activate its own server listening for such responses and the
central server would add the IP of the client to a list of clients to
receive notifications.

--
-Mike (TeamB)

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive