OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
13.2 Server Initialization Using the RPC Routines
Before a server can receive any remote procedure calls, it should usually initialize itself
by calling the dce_server_register( ) routine so that the server is properly recognized by
DCE. However, servers can instead use a series of the lower-level RPC runtime routines.
The server initialization code, written by the application developer, varies among
servers. However, every server must set up its communications capabilities, which
usually involves most of the following tasks:
1. Assigning types to objects
2. Registering at least one interface
3. Specifying which protocol sequences the server will use
4. Obtaining a list of references to a server’s binding information (a list of binding
handles)
5. Registering endpoints
6. Exporting binding information to a server entry or entries in the namespace
7. Listening for remote procedure calls
8. Performing cleanup tasks including unregistering endpoints
The following pseudocode illustrates the calls a server makes to accomplish these basic
initialization tasks:
/* Initialization tasks */
rpc_object_set_type(...);
rpc_server_register_if(...);
rpc_server_use_all_protseqs(...);
rpc_server_inq_bindings(...);
rpc_ep_register(...);
rpc_ns_binding_export(...);
rpc_server_listen(...);
/* Cleanup tasks */
rpc_ep_unregister(...);
13.2.1 Assigning Types to Objects
An object type is a mechanism for associating a set of RPC objects and the manager
whose remote procedures implement an RPC interface for those objects. Object types
allow an application to cluster objects, such as computing resources, according to any
relevant criteria. For example, a single accounting interface can be implemented to
operate on accounting databases that contain equivalent information but that are
formatted differently; each database format represents a distinct type.
13 4 Tandem Computers Incorporated 124245