Hi,
 
You can have your server com object to talk back to any number of clients through the use callbacks.  When you create an instance of your com server, the client can call a connect type method in which the client passes a reference to a callback interface and unique client ID (and anything else you like to use). You can put each reference to a clients callback interface and ID into an internal list on the server.  When the server wants to "call back" to the client, you have a list of available client callback interfaces and ID's. You can iterate through the list and call the appropriate methods on your callback interfaces based on IDs or anything else you decide.
 
I not 100% sure on how well this setup handles dropped client connections - you could always build something into the server to handle this.  A really good book on this type of thing is Delphi COM Programming by Eric Harmon (ISBN 1-57870-221-6) and you might want to pay a visit to techvanguards (http://www.techvanguards.com).
 
Cheers
Andrew
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeremy Coulter
Sent: Tuesday, 27 February 2001 7:56 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: DCOM clients

Hi all. I am looking at a solution, and I would like to use DCOM ifI can.
I wnat to have a client that connects to a DCOM Server. BUT Then I want to have the DCOM server talk to that specific client.
I inticipate there will upto 5 clients connecting to teh DCOM Server, but at one point I might only want to talk to client 2.
Is it possible to do this ? Does the client connection give the server any information that you can use to talk to it...like an identifying value etc.?
 
Thanks, Jeremy Coulter

Reply via email to