示例#1
0
        static void namedobjectclienttest()
        {
            testclient tc = new testclient();

            SimpleIPC.NamedObject.SIPCServer t1 = new SimpleIPC.NamedObject.SIPCServer("namedclient", tc);
            t1.Start();
            Console.WriteLine("namedclient running");
            var p      = new SimpleIPC.GenericProxy <Example.ICallInterface>(new SimpleIPC.NamedObject.SIPCProxy("namedserver"));
            int ticket = 0;

            Console.WriteLine("calling server : register(veda)");
            string s = p.Proxy.register("veda", "namedclient", out ticket);

            Console.WriteLine("result of register call:{0}, Ticket:{1}", s, ticket);
            Console.ReadKey();
            p.Dispose();
            t1.Stop();
        }
示例#2
0
        static void windowsclienttest()
        {
            testclient tc = new testclient();
            var        t1 = new SimpleIPC.Windows.ServerContainer();

            t1.Start();
            t1.CreateServer(new SimpleIPC.Windows.SIPCServer("winclient", tc));
            Console.WriteLine("winclient running");
            var p = new SimpleIPC.GenericProxy <Example.ICallInterface>(new SimpleIPC.Windows.SIPCProxy("winserver"));

            int ticket = 0;

            Console.WriteLine("calling server : register(veda)");
            string s = p.Proxy.register("veda", "winclient", out ticket);

            Console.WriteLine("result of register call:{0}, Ticket:{1}", s, ticket);
            Console.ReadKey();
            p.Dispose();

            t1.Stop();
        }