data exchange with IPC channel

P

Paul

Hi,
I am working with VS2008 and I am looking for a good way to transfer data
from one C#-application to another one. Both application are on the same
machine.

I found this example working with an ipc channel
http://msdn.microsoft.com/de-de/library/system.runtime.remoting.channels.ipc.ipcchannel.aspx

The example is very good, it is running on my computer. I think, that the
'class RemoteObject'
is created by the .NET framework and running in a different thread than the
server-thread. Correct?

Now I added a method to transport a string to the server:

// Remote object.
public class RemoteObject : MarshalByRefObject
{
private int callCount = 0;

public int TransportData(string txt)
{
Console.WriteLine(txt);
return 0;
}

public int GetCount()
{
Console.WriteLine("GetCount has been called.");
callCount++;
return(callCount);
}
}

Okay!
But now I want to consume the string sended to the server.
How can the server get access to the string (means: copy the content)?
And how to send an event to the servers main-thread saying 'new data arrived'?

Thanks for your answer!
 
C

CY

And how to send an event to the servers main-thread saying 'new data arrived'?

Looking for basic WCF of MSMQ like functions? pipes dont have triggers
(as I know) they have to be polled. MSMQ can be triggerd (havn't tried
it though) peekt or read... and buffers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top