PreviousNext

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

More:

Assigning Types to Objects

Registering Interfaces

Selecting RPC Protocol Sequences

Obtaining a List of Server Binding Handles

Registering Endpoints

Making Binding Information Accessible to Clients

Listening for Calls