On Thu, Mar 15, 2012 at 12:32 AM, Rush Manbert <[email protected]> wrote:

>
> On Mar 14, 2012, at 2:14 AM, Eastdawn Yang wrote:
>
> > Hello people,
> >
> > Is there built-in support in thrift to set timeout value for non-oneway
> RPC
> > call at client side?
> > For example, client->ping() will throw TException when timing out.
> >
> > Regards.
> > Tiger
>
> For C++ (that's what client->ping() looks like), TSocket.h declares these
> methods:
>
>  /**
>   * Set the connect timeout
>   */
>  void setConnTimeout(int ms);
>
>  /**
>   * Set the receive timeout
>   */
>  void setRecvTimeout(int ms);
>
>  /**
>   * Set the send timeout
>   */
>  void setSendTimeout(int ms);
>
>  /**
>   * Set the max number of recv retries in case of an EAGAIN
>   * error
>   */
>  void setMaxRecvRetries(int maxRecvRetries);
>
> - Rush


Thank you very much, Rush!

Best Regards.
Tiger

Reply via email to