Exemple #1
0
        static private void TestNamedobjectserver()
        {
            //instantiate server object
            var t = new testobj(false);

            //create a named container and add an unique named server
            var t1 = new SimpleIPC.NamedObject.SIPCServer("namedserver", t);

            //start
            t1.Start();
            Console.WriteLine("namedserver is running");
            Console.ReadKey();
            //stop container
            t1.Stop();
        }
Exemple #2
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();
        }