OSF DCE Application Development Guide--Core Components
Developing a Simple RPC Application
11.5.1.3 Selecting Protocol Sequences
The server calls rpc_server_use_all_protseqs() to obtain endpoints on which to listen
for remote procedure calls:
/*
* Use all protocol sequences that are available.
*/
rpc_server_use_all_protseqs(rpc_c_protseq_max_reqs_default,
&status);
ERROR_CHECK(status, "Can’t use protocol sequences");
11.5.1.4 Obtaining the Server’s Binding Handles
To obtain a vector of binding handles that it can use when registering endpoints, the
server calls rpc_server_inq_bindings( ):
/*
* Get the binding handles generated by the runtime.
*/
rpc_server_inq_bindings(&binding_vector, &status);
ERROR_CHECK(status, "Can’t get bindings for server");
11.5.1.5 Registering Endpoints
A call to rpc_ep_register() registers the server endpoints in the endpoint mapper
service of the local dced:
/*
* Register assigned endpoints with endpoint mapper.
*/
rpc_ep_register(
greetif_v1_0_s_ifspec, binding_vector, NULL,
(unsigned_char_p_t) "greet server version 1.0", &status);
ERROR_CHECK(status, "Can’t register with endpoint map");
11.5.1.6 Exporting to CDS
To advertise itself to clients, the server calls rpc_ns_binding_export( ). The server
entry for the namespace is obtained from the argument input when the server is invoked
(argv[1]).
124245 Tandem Computers Incorporated 11− 21