[ ECLiPSe message passing built-in.|Group Index| Full Index]

mps_port_lookup(+Key, +Name, -Port)

Return the port identifier registered under Key and Name in the name server.

+Key
A string, eg. the name of an application session
+Name
A string, eg. the name of a service
-Port
A variable

Description

The ECLiPSe message passing system incorporates a name service that enables processes to associate names with their ports. Ports can be registered, looked up and deregistered with the name server.

Port owners register their ports under unique and agreed upon names with the name service. Port users do a port lookup for acquiring a port's identifier that is required for sending messages to the port.

mps_port_lookup/3 is used by client processes to lookup port identifiers that have been registered under agreed names. To support multiple sessions of a distributed application sharing a single name server, the name server predicates have a session key parameter.

Fail Conditions

Fails if no port is registered under the given Name and Key.

Resatisfiable

No.

Exceptions

(4) Instantiation fault
Key or Name is uninstatiated
(5) Type error
Key or Name is not a string
(176)
Message passing system error

Examples

   



See Also

mps_init / 1, mps_ping / 1, mps_exit / 0, mps_port_register / 4, mps_port_deregister / 3, mps_port_allocate / 2, mps_port_deallocate / 1, mps_send / 2, mps_receive / 2