How to create grpc server code with cronet?
See original GitHub issueI want to create a grpc server code with cronet, and use android as client with cronet to call rpc interface, but i cannot find any server code in grpc-java branch, just only have som code for client as below, could you help? thanks
`import io.grpc.cronet.CronetChannelBuilder; import org.chromium.net.ExperimentalCronetEngine;
…
ExperimentalCronetEngine engine = new ExperimentalCronetEngine.Builder(context /* Android Context */).build(); ManagedChannel channel = CronetChannelBuilder.forAddress(“localhost”, 8080, engine).build();`
Issue Analytics
- State:
- Created a year ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Build client-server applications with gRPC - Android Developers
gRPC is a modern, open-source, high-performance RPC framework that can run in any environment. It can efficiently connect services in and ...
Read more >Chapter 4, gRPC: Under the Hood - O'Reilly
You use the service definition to generate either server- or client-side code for the language of your choice. All the low-level communication details...
Read more >gRPC Python implementation from scratch | by Vikesh Yadav
gRPC is designed to make the client believe that the server is ... proto run the following command to let gRPC auto-generate code...
Read more >io.grpc.cronet.CronetChannelBuilder.java Source code
Here is the source code for io.grpc.cronet. ... Executor executor); } /** Creates a new builder for the given server host, port and...
Read more >cronet - platform/external/grpc-grpc-java - Git at Google
Using Cronet with gRPC requires manually integrating the gRPC code in this ... This lets your Android app make RPCs using the same...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Use it like a normal server builder. So something like this: https://github.com/grpc/grpc-java/blob/806fb84a57216963e94e873bd86c16dda60a7745/examples/src/main/java/io/grpc/examples/helloworld/HelloWorldServer.java#L38-L41
But replace
ServerBuilder
withOkHttpServerBuilder
.(At some point we’ll hook up OkHttpServerBuilder into the ServerBuilder.forPort() API, so you could just use the ServerBuilder API. But we haven’t done that as of yet.)
This one https://github.com/grpc/grpc-java/blob/master/interop-testing/src/test/java/io/grpc/testing/integration/Http2Test.java#L102