views:

44

answers:

1

Hello,

I need to perform inter process communication using .NET Remoting. For this I would share some data in form of Data(Objects) & Methods .

Is there any way out by which my .NET Remoting client can detect that there's some data that is being shared or not, if its just go on and collect that data.Each time server server shares the data with its shared able methods and objects by Marshaling, it should be get aware for client that's another process.

Server can have multiple clients and data can be shared in multiple clients(specific clients or broadcast i.e for every client that is running as separate process).

On client side I would have single dedicated thread for checking shared data, if it arrive it would collect, sleep otherwise. Or somehow each time server sends and event to specific client or multiple clients to make them aware about arrived and shared data.

Is this is the functionality what .NET Remoting Events expose? My .NET Remoting server is C# process and client is C++/CLI processes.

Regards Usman

+1  A: 

That is possible with .NET Remoting. Perhaps the easiest way would be to have the remote object (the server) include an event to which clients can subscribe. When the server has data that it wishes to share, it just fires that event and any clients that subscribe to the event get a notification along with the data.

Jim Mischel
I have to send some strings and messages for my .Remoting server clients after creating those clients by server itself(Server will create seperate processes i.e clients) to which it needs to send messages and data.
Usman
I have to send some strings and messages for my .Remoting server clients after creating those clients by server itself(Server will create separate processes i.e clients) to which it needs to send messages and data. Each time client(i.e process) will launch, it will send its reference to the server side and server will attach its instance in its dispatcher list. and client on other end will wait infinitely or will go into sleeping thread. Whenever server needs to share its data client get aware and its thread wake up and can process shared data. Any code sample that will demonstrate this.?
Usman
In your situation, defining an event in the server and subscribing to it in the client is the way to go. I'm sorry that I do not have a code sample to share with you.
Jim Mischel