OSF DCE Application Development Guide--Introduction and Style Guide

Introduction to DCE Application Programming
1.5.5.2 Telling RPC Runtime What Protocol Sequences to Use
The second thing registering the server does is it obtains a set of endpoints and associates
them with the desired protocol sequences. Endpoints are the host’s address numbers on
which the server can receive incoming calls. This begins the process of actually setting
up the information that the server’s clients will need in order to bind to it.
The endpoints are usually dynamically generated each time the server starts. However,
some applications may use well-known endpoints that are the same every time the server
starts. If well-known endpoints are used, they are typically defined in the interface
definition with the endpoint attribute.
In the default case, all valid protocol sequences are used when the
dce_server_register( ) routine is called. The dce_server_c_no_protseq flag can be
passed in the first argument to the routine in cases where dynamic assignment of
endpoints is not desired; for example, when well-known endpoints (specified in the IDL
definition) are being used.
1.5.5.3 Registering the Binding Information with the Endpoint Mapper Service
After server registration obtains the endpoints, the endpoints, protocol sequences, and
object UUIDs are registered with the endpoint mapper service of the local host’s dced.
Typically the server has received a certain number of endpoints dynamically allocated on
its host machine. However, when prospective clients import binding information from
the namespace, they get partial bindings. When they first try to contact their server, the
partial binding will get them only as far as the server’s endpoint mapper service. The
purpose of registering endpoints is to let the endpoint mapper know what endpoints
belong to the server so that it can fill in the partial bindings as they arrive and route the
incoming remote calls on their proper ways. Subsequent remote calls executed with the
same bindings will go straight to the server, since the bindings are now complete.
The purpose of registering endpoints together with object UUIDs is to account for all
possible incoming object UUIDs (that is, object UUIDs that could appear in incoming
partial bindings arriving at the endpoint mapper), and to associate with each of them one
of the server’s allocated endpoints. Then the endpoint mapper can simply look up the
object UUID, find an endpoint, insert it into the binding, and send the RPC on to its
destination.
124246 Tandem Computers Incorporated 1 21