4.3 The Concrete Level

A portableMultiAddress specifies a group of communication ports. Start or enhance the group by inserting members. Reduce it by deleteing members.

A portablePortAddress specifies the identity of one logical communication destination. A logical destination corresponds to a number of concrete communication ports, represented by instances of specializations of concretePortAddress. It is up to the user of these patterns to ensure that the contained set of concrete ports actually logically belong to the same destination.

The idea is that if I can talk on a channel of type {A,B} and you can talk on a channel of type {B,C,D}, it is up to the underlying framework to discover that in order to establish a connection, we must use type B.

A portablePortAddress can be built by inserting specializations of concretePortAddress. Only one concrete address is allowed for each known type - inserting a second instance overrides the previously inserted one. With delete, any concrete port can be removed again. To retrieve a concrete port (without removing it), use one of the Get...Port operations. If this portablePortAddress does not contain any concrete port of the requested variety, NONE is exited.

ConcretePortAddress is an abstract superpattern for specifying the address of a concrete communication port, such as a UNIX stream socket, a Macintosh PPC ToolBox session, a shared memory buffer etc.

Like a portableCommAddress, each concrete specialization is able to express its value textually with the operation asText, and it is able to characterize its communication protocol with the operation protocol. The operation protName exits a text which is a short, descriptive name for that protocol, and conformsTo answers true/false to the question, whether this kind of connection conforms to the protocol associated with an entered commProtocol_... constant.

The pattern unixAbstractPortAddress captures similarities between TCP and UDP ports, represented by tcpPortAddress and udpPortAddress. The tcpPortAddress also fits a MacTCP port. The pattern unixPortAddress represents an AF_UNIX address family socket, i.e. it appears as a name in some directory, just like a file; ppcPortAddress represents a Macintosh PPC ToolBox session; memPortAddress corresponds to a shared memory implementation of inter-process communication.


Process Libraries - Reference Manual
© 1994-2002 Mjølner Informatics
[Modified: Friday October 20th 2000 at 14:22]