public ServerService GetServerServerServiceWithoutSsl() { var server = new ServerService(new Grpc.Core.Server { Services = { TestService.BindService(new ServiceImpl()), Tester.BindService(new TestingImpl()) }, Ports = { new ServerPort(Defines.HostName, Defines.Port, ServerCredentials.Insecure) } }); return(server); }
public ServerService GetServerServiceWithSsl() { var cred = _credentialsProvider.GetSslServerCredentials(); var server = new ServerService(new Grpc.Core.Server { Services = { TestService.BindService(new ServiceImpl()), Tester.BindService(new TestingImpl()) }, Ports = { new ServerPort(Defines.HostName, Defines.Port, cred) } }); return(server); }
private static void Main(string[] args) { var server = new Grpc.Core.Server { Services = { Tester.BindService(new TesterService()) }, Ports = { new ServerPort("0.0.0.0", 5001, ServerCredentials.Insecure) } }; server.Start(); Console.WriteLine("Listening on port 5001"); Thread.Sleep(Timeout.Infinite); }