DCE for the HP e3000 (B3821-90003)

Chapter 7 67
Programming with RPC 1.2.1 on MPE/iX
* second parameter is the binding vector returned by the RPC runtime
* describing the endpoints (IP ports) on which this server is listening
* for RPC requests. The third parameter is a vector of object UUIDs
* that the server offers; this server does not implement multiple
* objects so it specifies NULL. The fourth parameter is an annotation
* used for informational purposes only. The RPC runtime does not use
* this string to determine which server instance a client communicates
* with, or for enumerating endpoint map elements. The last parameter
* is the DCE error status.
*
* When this call completes the bindings we established with the RPC,
* runtime will be associated with this interface. This allows a client
* to look up a server by interface without specifying an endpoint
* (port): instead, by contacting the endpoint mapper, a client is able
* to locate servers registered using dynamic (system-chosen) endpoints.
*/
rpc_ep_register(sleeper_v1_0_s_ifspec, /* generated interface spec */
bvec, /* runtime's binding vector */
NULL, /* no objects supported */
(unsigned_char_t *) sleeper_description,
&st); /* error status for this call */
if (st != rpc_s_ok) {
dce_error_inq_text(st, dce_err_string, (int *)&_ignore);
PRINT_FUNC(PRINT_HANDLE, "Cannot register with endpoint map: %s\n",
dce_err_string);
exit(1);
}
PRINT_FUNC(PRINT_HANDLE, "Listening...\n");
/* rpc_server_listen() --
*
* Listen and handle incoming RPC requests. This call typically does
* not return; instead incoming RPC requests will be dispatched to the
* manager function(s), each in its own thread.
*
* The first parameter is the maximum number of concurrently executing
* remote procedure calls to allow. The second parameter is the DCE
* error status.