|
|
11.1 An Example Service Described in the RPC Language
Connected: An Internet Encyclopedia
11.1 An Example Service Described in the RPC Language
Up:
Connected: An Internet Encyclopedia
Up:
Requests For Comments
Up:
RFC 1831
Up:
11. THE RPC LANGUAGE
Prev: 11. THE RPC LANGUAGE
Next: 11.2 The RPC Language Specification
11.1 An Example Service Described in the RPC Language
11.1 An Example Service Described in the RPC Language
Here is an example of the specification of a simple ping program.
program PING_PROG {
/*
* Latest and greatest version
*/
version PING_VERS_PINGBACK {
void
PINGPROC_NULL(void) = 0;
/*
* Ping the client, return the round-trip time
* (in microseconds). Returns -1 if the operation
* timed out.
*/
int
PINGPROC_PINGBACK(void) = 1;
} = 2;
/*
* Original version
*/
version PING_VERS_ORIG {
void
PINGPROC_NULL(void) = 0;
} = 1;
} = 1;
const PING_VERS = 2; /* latest version */
The first version described is PING_VERS_PINGBACK with two
procedures, PINGPROC_NULL and PINGPROC_PINGBACK. PINGPROC_NULL takes
no arguments and returns no results, but it is useful for computing
round-trip times from the client to the server and back again. By
convention, procedure 0 of any RPC protocol should have the same
semantics, and never require any kind of authentication. The second
procedure is used for the client to have the server do a reverse ping
operation back to the client, and it returns the amount of time (in
microseconds) that the operation used. The next version,
PING_VERS_ORIG, is the original version of the protocol and it does
not contain PINGPROC_PINGBACK procedure. It is useful for
compatibility with old client programs, and as this program matures
it may be dropped from the protocol entirely.
Next: 11.2 The RPC Language Specification
Connected: An Internet Encyclopedia
11.1 An Example Service Described in the RPC Language
|
|
|
 |

|
 |
|
Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
| |
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
| |
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
| |
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
| |
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!
|
|
Service Details
|
|
 |
|