>>>
>>>Can COM have a handle for each client. Could a COM relay a message to a
>>>specific client, but not to others?
>>
>>A COM component gets called from a specific client. It will only handle calls from whatever client calls it. Is this what you're asking?
>
>I was thinking in terms of VFP pier-to-pier (apartment threaded?) COM. If two clients instanciate the same server, could the server be used to pass (push) a message from one of the clients to the other? I've had some experience with
>languages that offer an HWND port.
>
>I guess I am trying to understand if a server can be "aware" of the clients
>holding it's object reference, and can the server direct mesaages (providing a push mechanism is in place) to a specific client.
......
"(providing a push mechanism is in place)"
......
that's the crux of the question right there.
yes you can create an out-of-process server that will service only
one client at a time, or an out-of-process server that can be used
by multiple clients at the same time.
in either case, the clients have an _object reference_ to the server,
not the other way around. i.e. all actions are initiated by the client.
as for some coordination and/or communication between clients
(moderated by the server), sure, you can implement that. create a method
(that the client calls) that records some client identification
(like in an array or table or something like that). it is in the
client invocation of that method that the client would identify itself.
as for a push method .... no .... one client could submit a message
(by calling an appropriate "send-message" method) and your server would
store in some sort of message queue, but the destination
client would need to call a "get-message" method to retrieve it.
the out-of-process server does not have any reference to client processes.
patrick