问题
Both grpc-java and grpc-c++ have the support for in-process channel, which is used if grpc client and server are in the same process.
So I have a question, is it possible to use java client to call c++ server in the same process using in-process channel?
回答1:
No. The inprocess channels in each language are language-specific. You would need to use a normal channel and a port of localhost.
While it might be possible to use socketpair() to do something similar, it would require some effort to get working.
来源:https://stackoverflow.com/questions/49600158/is-it-possible-to-use-java-client-to-call-c-server-in-the-same-process-using-i