nkadd
January 6, 2020, 4:34am
1
How can I use official c++ client with grpc technology (not rest api)?
The official c++ client docs seems describe rest api connection:
‘‘The createDefaultClient will create HTTP/1.1 client to use REST API.’’
I want better performance by using grpc client.
@nkadd The official CPP client sdk supports both the REST API and the GRPC API in the server. @Dimon4eg can share an example on how to build and use the GRPC version of the SDK.
nkadd
January 6, 2020, 12:22pm
4
And how can I use it?
I could’nt see any api document or example for grpc client.
There are these two options; either will work:
Just disable Rest client in config, then re-build sdk
Use createGrpcClient
instead of createDefaultClient
nkadd
January 6, 2020, 6:19pm
6
@Dimon4eg
So are these steps enough:
disable rest client
enable grpc client
rebuild sdk
use createDefaultClient
or should I use createGrpcClient
in step 4?
Q 2: Are all other apis (authentication,ssl,storage,custom rpc) same as official c++ client document?
Q 3: How to use ssl encryption at the client side with grpc cpp client?
Any should work createDefaultClient
or createGrpcClient
.
A 2: Yes, API the same
A 3: The same way as for Rest client - enable ssl in NClientParameters
and then create client with it.
nkadd
January 8, 2020, 12:04pm
8
@Dimon4eg
Could you please build a grpc version of c++ client for android?
I’m not a build expert!
You don’t have to be build expert.
Please follow https://github.com/heroiclabs/nakama-cpp#building-for-android
That 's not that hard.
If you have questions you can ask me directly.