HighTechTalks DotNet Forums  

How to use IPC classes in .NET (ipcclientchannel & ipcserverchannel)

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss How to use IPC classes in .NET (ipcclientchannel & ipcserverchannel) in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
tony
 
Posts: n/a

Default How to use IPC classes in .NET (ipcclientchannel & ipcserverchannel) - 08-01-2007 , 07:56 AM






I want to use ipcclientchannel & ipcserverchannel class for
interprocess communication. I refered to msdn, and the code for server
is as follows. My Question is how can I write to the Shared Object
(Counter) since I want to pass some data from server to client?

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Ipc;

public class IpcServer
{

public static void Main ()
{
// Create and register an IPC channel
IpcServerChannel serverChannel = new
IpcServerChannel("remote");
ChannelServices.RegisterChannel(serverChannel);

// Expose an object

RemotingConfiguration.RegisterWellKnownServiceType ( typeof(Counter),
"counter", WellKnownObjectMode.Singleton );

// Wait for calls
Console.WriteLine("Listening on {0}",
serverChannel.GetChannelUri());
Console.ReadLine();
}

}


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.