Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }