1

We use RPC (udp socket) in our application and we noticed that RPC retransmit it messages when it was not received (or confirmed) by the target application.

Does RPC present the order of messages? let say we have message 1 and message 2, does it wait for message 1 to be confirmed by the receiver and then sends message 2?

also I wasn't been able to find how many retries it does by default and if the sending failed after x retries does it log it somewhere so we can inspect it?

Thanks

gavv
  • 4,649
  • 1
  • 23
  • 40
Jan
  • 1,054
  • 13
  • 36

1 Answers1

1

RPC library has a call to control how long to wait before retry the request:

 struct timeval tv;
 clnt_control(cl, CLSET_TIMEOUT, (char *) &tv);

when you invoke an rpc call, you provide total timeout:

 enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
                       xdrproc_t inproc, char *in,
                       xdrproc_t outproc, char *out,
                       struct timeval tout);

if you divide tout by value you set with clnt_control, you will get number of retries.

The sync/async behavior depends on your application only.

kofemann
  • 4,217
  • 1
  • 34
  • 39