DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Programming with Remote Procedure Calls (RPC)

Timeout changes

After sending a request to the server, a client program waits for a default amount of time (25 seconds) to receive a reply. This timeout may be changed using the clnt_control routine. (See rpc(3rpc).)


NOTE: When considering timeout periods, be sure to allow for the minimal amount of time required for ``round trip'' communications over the network.

This is a small code fragment to illustrate the use of clnt_control:

   struct timeval tv;
   CLIENT *cl;
   

cl = clnt_create("somehost", SOMEPROG, SOMEVERS, "visible"); if (cl == NULL) { exit(1); } tv.tv_sec = 60; /* change timeout to 1 minute */ tv.tv_usec = 0; clnt_control(cl, CLSET_TIMEOUT, &tv);


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004