标签:public 通讯 cli ann onclick void 进程 span ati
Server端:注册信道
1 /// <summary> 2 /// 注册IPC管道通讯 3 /// </summary> 4 public void IpcServer() 5 { 6 IpcServerChannel channel = new IpcServerChannel("ServerChannel"); 7 ChannelServices.RegisterChannel(channel, false); 8 RemotingConfiguration.RegisterWellKnownServiceType(typeof(类型-class), "注册名称--对象名", WellKnownObjectMode.SingleCall); 9 }
Client端:连接获取信道
1 IpcClientChannel channel = new IpcClientChannel(); 2 ChannelServices.RegisterChannel(channel, false); 3 4 (类型-class) obj = (类型-class)Activator.GetObject(typeof(类型-class), "ipc://ServerChannel/注册信道名-对象名"); 5 6
标签:public 通讯 cli ann onclick void 进程 span ati
原文地址:https://www.cnblogs.com/BennyHua/p/11133414.html