Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //var server = new Server("127.0.0.1", 5000);
            //server.Start();
            //Console.WriteLine("按任意键关闭server...");
            //Console.ReadLine();
            //server.Stop();

            var server = new RpcServer("127.0.0.1", 5000);

            var simpleContract = new DataContractImpl();

            server.AddService <IDataContract>(simpleContract);

            server.Start();

            Console.WriteLine("按任意键关闭server...");
            Console.ReadLine();
            server.Stop();

            Console.Read();
        }