File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/main/java/io/grpc/examples/helloworldtls Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ application {
7676 applicationDistribution. into(' bin' ) {
7777 from(helloWorldTlsServer)
7878 from(helloWorldTlsClient)
79- fileMode = 0755
79+ filePermissions {
80+ unix(0755 )
81+ }
8082 }
8183}
Original file line number Diff line number Diff line change @@ -53,9 +53,7 @@ public void greet(String name) {
5353 HelloRequest request = HelloRequest .newBuilder ().setName (name ).build ();
5454 HelloReply response ;
5555 try {
56- response = io .grpc .stub .ClientCalls .blockingUnaryCall (
57- blockingStub .getChannel (), GreeterGrpc .getSayHelloMethod (),
58- blockingStub .getCallOptions ().withAuthority ("foo.test.google.in" ), request );
56+ response = blockingStub .sayHello (request );
5957 } catch (StatusRuntimeException e ) {
6058 logger .log (Level .WARNING , "RPC failed: {0}" , e .getStatus ());
6159 return ;
@@ -90,7 +88,7 @@ public static void main(String[] args) throws Exception {
9088 }
9189 String host = args [0 ];
9290 int port = Integer .parseInt (args [1 ]);
93- ManagedChannel channel = OkHttpChannelBuilder . forAddress (host , port , tlsBuilder .build ())
91+ ManagedChannel channel = Grpc . newChannelBuilderForAddress (host , port , tlsBuilder .build ())
9492 /* Only for using provided test certs. */
9593 .overrideAuthority ("foo.test.google.fr" )
9694 .build ();
You can’t perform that action at this time.
0 commit comments