### Well-Known Endpoints

A well-known endpoint is a preassigned stable address that a server uses every time it runs. Well-known endpoints typically are assigned by a central authority responsible for a transport protocol; for example, the Internet Assigned Numbers Authority assigns endpoint values for the IP family of protocols. If you use well-known endpoints for a server, you should register them with the appropriate authority.

Well-known endpoints can be declared for an interface (in the interface declaration) or for a server instance, as follows:

· Any interface definition can be associated with one or more endpoints, along with the RPC protocol sequence corresponding to each endpoint (the endpoint attribute).

When compiling an interface, the IDL compiler stores each combination of endpoint and protocol sequence in the interface specification. If a call is made using binding information that lacks an endpoint, the RPC runtime automatically looks in the interface specification for a well-known endpoint specified for the protocol sequence obtained from the binding information. If the interface specification contains an appropriate endpoint, the runtime adds it to the binding information.

· Alternatively, server-specific, well-known endpoints can be defined in server application code. When asking the runtime to use a given protocol sequence, the server supplies the corresponding endpoints to the RPC runtime. On a given system, each endpoint can be used by only one server at a time. If server application code contains a hardcoded endpoint or the server's installers always specify the same well-known endpoint, only one instance of the server can run per system.

When a server exports its binding information to a namespace server entry, the export operation includes any well-known endpoints within the server binding information stored in the server entry.

###