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(NS).)


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);


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005