using System; using Grpc.Core; using Aurora.Backend.Proto; namespace Aurora.Backend.Services.Server { public class ServerService : BaseService { const int Port = 50051; public ServerService() { Grpc.Core.Server server = new Grpc.Core.Server { Services = { PartyService.BindService(new PartyServiceImpl()), PlaybackService.BindService(new PlaybackServiceImpl()) }, Ports = { new ServerPort("localhost", Port, ServerCredentials.Insecure) } }; server.Start(); Console.WriteLine("Aurora server listening on port " + Port); Console.WriteLine("Press any key to stop the server..."); Console.ReadKey(); server.ShutdownAsync().Wait(); } } }