예제 #1
0
        public void Init()
        {
            serviceImpl = new HealthServiceImpl();

            server = new Server();
            server.AddServiceDefinition(Grpc.Health.V1Alpha.Health.BindService(serviceImpl));
            int port = server.AddListeningPort(Host, Server.PickUnusedPort);
            server.Start();
            channel = new Channel(Host, port);

            client = Grpc.Health.V1Alpha.Health.NewClient(channel);
        }
예제 #2
0
        public void Init()
        {
            serviceImpl = new HealthServiceImpl();

            server = new Server
            {
                Services = { Grpc.Health.V1Alpha.Health.BindService(serviceImpl) },
                Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } }
            };
            server.Start();
            channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure);

            client = Grpc.Health.V1Alpha.Health.NewClient(channel);
        }
예제 #3
0
        public void Init()
        {
            serviceImpl = new HealthServiceImpl();

            server = new Server
            {
                Services = { Grpc.Health.V1Alpha.Health.BindService(serviceImpl) },
                Ports    = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } }
            };
            server.Start();
            channel = new Channel(Host, server.Ports.Single().BoundPort, Credentials.Insecure);

            client = Grpc.Health.V1Alpha.Health.NewClient(channel);
        }