albiro
10/31/2004 8:41:00 PM
Hi all,
I do apologise if some of the following explanations are rather basic,
but I'm unable to express myself in an enormously technical manner.
I've been fiddling with .NET remoting to put in place a small
client/server system, whereby a remotable objects acts as a "midway"
communication class between the server and the clients.
The server itself handles all the work of coordinating the clients,
and the remotable object simply acts as a way for the clients to say
to the server "hi im here, ready!", and for the server to then send
messages back to the client.
The concept I'm struggling with, is that of subscription to the events
of the remotable object. As far as I've managed to understand, the
clients request the remotable object using the Activator.GetObject()
method, and use the remotable object to run some methods, which in
turn trigger events within the remotable object.
Now, the problem comes when I want to make the server subscribe to
these events. The only method I can see of accomplishing this, is to
in effect, make the server a client, and call the remotable object and
keep it locally. This way, it subscribes to the event, just as if it
was a client, as all the work I want the server to do, I want to keep
independent of the clients, so not remotable.
I was wondering if there's any method of getting a server to subscribe
to events for each individual client, so it handles the clients on a
one-by-one basis, rather than filtering client on the remotable object
level, and if so, any pointers to any information on this?
Many thanks,
Alvaro