NetIPC 3000/XL Programmer's Reference Manual (5958-8600)

Table Of Contents
22 Chapter1
NetIPC Fundamentals
Using NetIPC for Interprocess Communication
Using NetIPC for Interprocess
Communication
The following paragraphs describe the tasks for using NetIPC for
process-to-process communication in programs which are:
Establish a connection.
Send and receive data over the connection.
Shut down the connection.
These discussions are based on access to level 4 (TCP) but most
principles apply to direct access to level 3 (X.25). Information specific to
X.25 is noted in the discussion.
After establishing a virtual circuit, you can use other NetIPC functions
which are described in this chapter under the heading, “Additional
NetIPC Functions”.
Establishing a Level 4 Connection
The following paragraphs are a call-by-call explanation of the dialogue
through which a virtual circuit connection is built. This example uses
the socket registry facility by establishing names for call sockets with
IPCNAME and retrieving the names with IPCLOOKUP. Figure 1-9 shows
the sequence of calls to use if the address of the socket is known (using
IPCDEST).
Only two processes are shown in this example. Either or both of the
processes shown can establish virtual circuit connections with other
processes. Secondary or auxiliary connections can also be set up
between the same two processes.
NOTE
Both of the processes in the following dialogue are assumed to be
created and running at their respective nodes. NetIPC does not include
a call to schedule remote processes. Refer to the chapter, Remote
Process Management, in the Using NS 3000/XL Network Services
manual for more information about initializing remote processes with
RPM.
1. Creating a Call Socket
Interprocess communication is initiated when Process A and Process B
each create a call socket by invoking the NetIPC call IPCCREATE (see
Figure 1-2). As explained previously, a call socket is roughly analogous
to a telephone with multiple extensions (see Figure 1-1). IPCCREATE
returns a call socket descriptor to the calling process in its
calldesc
parameter that describes the call socket, or “telephone extension,” that