NetIPC 3000/XL Programmer's Reference Manual (5958-8600)
Table Of Contents
- 1 NetIPC Fundamentals
- 2 Cross-System NetIPC
- 3 NetIPC Intrinsics
- 4 NetIPC Examples
- A IPC Interpreter (IPCINT)
- B Cause and Diagnostic Codes
- C ErrorMessages
- D Migration From PTOP to NetIPC and RPM
- E C Program Language Considerations

132 Chapter4
NetIPC Examples
Example 1
Example 1
In the first two programs (1A and 1B), the lengths of the data messages
are not known. The sending side (Program 1A) includes the length of
each message as the first two bytes of each message it sends. The
receiving side (Program 1B) executes two IPCRECV loops for each
message: first to receive the length and then to receive the data.
The first program (Program 1A):
• looks up the call socket named RALPH located on node JANE and
gets back a destination descriptor;
• creates its own call socket;
• sends a connection request to RALPH;
• shuts down its call socket and its destination socket;
• completes the connection;
• executes a loop in which it:
— reads a line of data;
— stores the length (number of bytes) of the data in the first part of
the message;
— stores the data itself in the second part of the message;
— sends the message on the connection, including the message
length as the first two bytes of the message;
• sends a “last message” which will be recognized by the receiving
program as a termination request;
• receives a “termination confirmation message” and shuts down the
connection by releasing its VC socket.
The second program (Program 1B):
• creates a call socket and names it RALPH;
• waits to receive a connection request;
• shuts down its call socket;
• executes a loop in which it:
— calls a procedure that receives a message by executing two
IPCRECV loops (the first loop determines the incoming message
length and the second loop receives data until all the pieces of the
message have been received);
— prints the message which was received;
• receives a “last message” termination request;