Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Server server = new Server
            {
                Services = { ZodiacService.BindService(new ZodiacFinderImpl()) },
                Ports    = { new ServerPort("localhost", Port, ServerCredentials.Insecure) }
            };

            server.Start();

            Console.WriteLine("Server functioneaza pe portul : " + Port);
            Console.ReadKey();

            server.ShutdownAsync().Wait();
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            Server server = new Server
            {
                Services = { ZodiacService.BindService(new ZodiacFinderImpl()) },
                Ports    = { new ServerPort("localhost", Port, ServerCredentials.Insecure) }
            };

            server.Start();

            Console.WriteLine("Server listening on port " + Port);
            Console.WriteLine("Press any key to stop the server...");
            Console.ReadKey();

            server.ShutdownAsync().Wait();
        }