示例#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();
        }
示例#2
0
        static private void Testwindowsserver()
        {
            //instantiate server object
            var t = new testobj(true);

            //create a windows container and start it
            var t1 = new SimpleIPC.Windows.ServerContainer();

            t1.Start();

            //create a unique windows server and inject server object created above
            t1.CreateServer(new SimpleIPC.Windows.SIPCServer("winserver", t));
            Console.WriteLine("winserver is running");
            Console.ReadKey();
            t1.Stop();
        }