Chapter 3. Interprocess Communication

Table of Contents

3.1. Connections and Channels
3.2. Task Structure Caching
3.3. Messages
3.4. Cascade NameServer Functions
3.5. Photon Functions
3.6. Pulses and Timers
3.7. Cascade QueueServer Functions
3.8. Receiving Messages and Events
3.9. Replying to Messages
3.10. Sending Messages
3.11. Task Structures
3.12. Working with TCP/IP

This package is written to be source code compatible across the QNX 4, QNX 6 and Linux operating systems. In Linux, the SRR Module is required.

In addition to this library, two programs are required: qserve and nserve. These should have been included with this package or another sofware package from Cogent. qserve provides asynchronous message queueing services, and offers a number of small changes from the semantics of the POSIX mqueue program. The major differences are the semantics of message notification, transparent networking, and the removal of a queue when its creating process terminates. nserve provides name resolution services on a per-process basis, allowing processes to easily identify one another by name, thereby making it possible for them to communicate. nserve is intended to maintain consistent name information across a network. In addition, nserve can inform all processes on the network via qserve whenever a named process start or stops.

Node ID has different meanings in QNX 4, QNX 6 and Linux. In QNX 4, the node ID is the node number, which is unique on the network, and always refers to the same node. In QNX 6, the node ID is the "node descriptor", which is only unique on a single machine, and is transient on the network. The node ID, when valid, indicates the identifier of the foreign node as seen by the current node. A node ID of zero always indicates the node on which the process is running. In Linux, the node ID is currently meaningless, as the SRR Module does not implement network message passing.

3.1. Connections and Channels

Connection and channel identifiers and node names are only relevant to QNX 6. Under QNX 4 and Linux, connection and channel should always be zero, and node name will either be the string representation of a node number, or "".