コード例 #1
0
ファイル: Program.cs プロジェクト: mikkomcmenamin/GrpcToUnity
        static void Main(string[] args)
        {
            Server server = new Server
            {
                Services = { UnityService.BindService(new UnityServiceImpl()) },
                Ports    = { new ServerPort("localhost", Port, ServerCredentials.Insecure) }
            };

            server.Start();

            Console.WriteLine("Press any key to stop the server...");
            Console.ReadKey();

            server.ShutdownAsync().Wait();
        }