PreviousNext

The endpoint Attribute

The endpoint attribute specifies the well-known endpoint or endpoints on which servers that export the interface will listen. The endpoint attribute takes the form:

endpoint (endpoint_spec, ...)

Each endpoint_spec is a string in the following form:

"family : [endpoint]"

The family identifies a protocol family. The following are accepted values for family:

· ncacn_ip_tcp: NCA Connection over Internet Protocol: Transmission Control Protocol (TCP/IP)

· ncadg_ip_udp: NCA Datagram over Internet Protocol: User Datagram Protocol (UDP/IP)

The endpoint identifies a well-known endpoint for the specified family. The values accepted for endpoint depend on the family but typically are integers within a limited range. IDL does not define valid endpoint values.

Well-known endpoint values are typically assigned by the central authority that "owns" a protocol. For example, the Internet Assigned Numbers Authority assigns well-known endpoint values for the IP protocol family.

At compile time, the IDL compiler checks each endpoint_spec only for gross syntax. At runtime, stubs pass the family and endpoint strings to the RPC runtime, which validates and interprets them.

Most applications should not use well-known endpoints and should instead use dynamically assigned opaque endpoints. Most interfaces designed for use by applications should therefore not have the endpoint attribute.

The following example illustrates use of the endpoint attribute:

endpoint ("ncacn_ip_tcp:[1025]", "ncadg_ip_udp:[6677]")

The endpoint attribute can appear at most once in an interface.