You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2019/03/25 03:32:54 UTC

[GitHub] [incubator-brpc] zyearn commented on issue #700: grpc迁移brpc问题

zyearn commented on issue #700: grpc迁移brpc问题
URL: https://github.com/apache/incubator-brpc/issues/700#issuecomment-476043492
 
 
   ClientContext在brpc里面对应是Controller,把本来要赋给ClientContext值在Controller里面找到对应项。
   ```
   ClientContext context;
   Status status = stub_->SayHello(&context, request, &reply); 
   ```
   替换成:
   ```
   brpc::Controller cntl;
   cntl.set_timeout_ms(...);
   ...
   stub_->SayHello(&cntl, &request, &reply, NULL); 
   if (cntl.Failed()) {
   ...
   }
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org