baidu / sofa-pbrpc

A light-weight RPC implement of google protobuf RPC framework.
Other
2.13k stars 655 forks source link

options for the server #13

Closed itismewxg closed 10 years ago

itismewxg commented 10 years ago

how many options defined in this framework? what is more, can we get the some low level info from the RPC, likely the fd, peer IP, as we may need to do the stats on this items, Thanks!

qinzuoyan commented 10 years ago
  1. how many options defined in this framework? Please see "Server/Client配置参数" section in page https://github.com/BaiduPS/sofa-pbrpc/wiki/高级使用.
  2. can we get the some low level info from the RPC, likely the fd, peer IP? Yes, you can get more info by RpcController, such as "LocalAddress()", "RemoteAddress()", "IsRequestSent()" and "SentBytes()", see https://github.com/BaiduPS/sofa-pbrpc/blob/master/src/sofa/pbrpc/rpc_controller.h. On the other way, RpcServer also provides some interfaces such as "ServiceCount()" and "ConnectionCount()", see https://github.com/BaiduPS/sofa-pbrpc/blob/master/src/sofa/pbrpc/rpc_server.h. The same with RpcClient. But, the fd is hiden for user, because boost::asio does not provide the details.
itismewxg commented 10 years ago

Thanks