supernovaer commented on issue #715: http2 / grpc问题
URL: https://github.com/apache/incubator-brpc/issues/715#issuecomment-511734834
 
 
   client端进程启动流程大概是这样的:
   brpc::Server server; server.AddService(xxx); brpc::ServerOptions options; 
options.h2_settings.stream_window_size=brpc::policy::FLAGS_h2_client_stream_window_size;
 
options.h2_settings.connection_window_size=brpc::policy::FLAGS_h2_client_connection_window_size;
 (这两个size的赋值是新加的,好像没什么用)server.Start(ip:port, &options);
   
   client请求grpc的流程大概是这样的:
   分别申请brpc::Controller cntl、Channel对象 channel,brpc::ChannelOptions options; 
options.protocol="h2:grpc"; 
options.connection_type="single";channel.Init(grpc_ip:port, 
&options);然后定义grpc服务proto service对应的xxx_Stub stub(&channel); 
stub.service_name(&cntl, &req, &rsp, NULL);

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to