sogou / srpc

RPC framework based on C++ Workflow. Supports SRPC, Baidu bRPC, Tencent tRPC, thrift protocols.
Apache License 2.0
1.94k stars 382 forks source link

Add interface for client callee timeout. #323

Closed holmes1412 closed 1 year ago

holmes1412 commented 1 year ago

Add interface for client request timeout.

  1. RPCClientParams : add timeout;
  2. tRPC protocol : transfer timeout in request meta;

Usage:

    struct RPCClientParams params = RPC_CLIENT_PARAMS_DEFAULT;
    params.host = "127.0.0.1";
    params.port = 1412;
    params.callee_timeout = 1000; // The unit depends on the implementation of the specific protocol