public static void Main(string[] args) { Node n = BuildExpr(); if (args.Length != 1) { Console.WriteLine("Specify 'server' or 'client' as first argument"); return; } if (args[0] == "client") { Ice.IceClientChannel ic = new Ice.IceClientChannel(); ChannelServices.RegisterChannel(ic); NodeEvaluator ne = (NodeEvaluator)Activator.GetObject(typeof(NodeEvaluator), "ice://localhost:10000/ne"); int res = ne.EvalNode(n); Console.WriteLine("Result: {0}", res); } else if (args[0] == "server") { Ice.IceChannel ic = new Ice.IceChannel(10000); ChannelServices.RegisterChannel(ic); RemotingConfiguration.RegisterWellKnownServiceType(typeof(NodeEvaluatorI), "ne", WellKnownObjectMode.Singleton); Console.ReadLine(); } }
public static void Main () { Ice.IceChannel ic = new Ice.IceChannel (); ChannelServices.RegisterChannel (ic); HelloDispatcher hd = (HelloDispatcher) Activator.GetObject (typeof (HelloDispatcher), "ice://localhost:10000/hellodispatcher"); HelloReceiverI hr = new HelloReceiverI(); RemotingServices.Marshal (hr, "asdf"); hd.tellHello (hr, "proxying"); }
public static void Main () { Ice.IceChannel ics = new Ice.IceChannel (10000); ChannelServices.RegisterChannel (ics); RemotingConfiguration.RegisterWellKnownServiceType (typeof (HelloDispatcherI), "hellodispatcher", WellKnownObjectMode.Singleton); Console.ReadLine(); }
public static void Main() { Ice.IceChannel ics = new Ice.IceChannel(10000); ChannelServices.RegisterChannel(ics); RemotingConfiguration.RegisterWellKnownServiceType(typeof(HelloDispatcherI), "hellodispatcher", WellKnownObjectMode.Singleton); Console.ReadLine(); }
public static void Main() { Ice.IceChannel ic = new Ice.IceChannel(); ChannelServices.RegisterChannel(ic); HelloDispatcher hd = (HelloDispatcher)Activator.GetObject(typeof(HelloDispatcher), "ice://localhost:10000/hellodispatcher"); HelloReceiverI hr = new HelloReceiverI(); RemotingServices.Marshal(hr, "asdf"); hd.tellHello(hr, "proxying"); }
public static void Main (string[] args) { Node n = BuildExpr(); if (args.Length != 1) { Console.WriteLine ("Specify 'server' or 'client' as first argument"); return; } if (args[0] == "client") { Ice.IceClientChannel ic = new Ice.IceClientChannel(); ChannelServices.RegisterChannel (ic); NodeEvaluator ne = (NodeEvaluator) Activator.GetObject (typeof (NodeEvaluator), "ice://localhost:10000/ne"); int res = ne.EvalNode (n); Console.WriteLine ("Result: {0}", res); } else if (args[0] == "server") { Ice.IceChannel ic = new Ice.IceChannel(10000); ChannelServices.RegisterChannel (ic); RemotingConfiguration.RegisterWellKnownServiceType (typeof (NodeEvaluatorI), "ne", WellKnownObjectMode.Singleton); Console.ReadLine(); } }