|
|
NetIPC 3000/XL Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 1 NetIPC FundamentalsNetIPC Concepts |
|
The following paragraphs describe the concept of sockets, and the NetIPC terms used to describe a NetIPC connection. NetIPC uses a data structure called a socket to create a connection to a NetIPC process on another system. Even though this process may reside upon the same node, the process that receives the NetIPC call is known as a remote system. The NetIPC calls are used to establish connections and manipulate sockets so that data can be exchanged with other processes. The Transmission Control Protocol (Transport Layer) (TCP) regulates the transmission of data to and from these data structures. When direct access to level 3 (X.25) is used, the X.25 protocol regulates the transmission of data between sockets. Although data must pass through the control of lower-level protocols, these details are transparent to NetIPC processes when they send and receive data. Before a connection can be established between two NetIPC processes, each process must create a call socket. A call socket is a type of socket that is roughly analogous to a telephone handset with multiple buttons or extensions. NetIPC processes engage in a three-way handshake over the connection formed by their respective call sockets in order to create a virtual circuit (VC) socket at each process. A call socket can be thought of as one of the steps needed to build a VC socket.The VC sockets created by this dialogue are the endpoints of a new connection called a virtual circuit or virtual circuit connection. A call socket is analogous to a telephone with multiple extensions, and a VC socket is analogous to one of the telephone extensions as shown in Figure 1-1 “Telephone Analogy”. Virtual circuits are the basis for interprocess communication. Once a virtual circuit is established, the two processes that created it may use it to exchange data. Two processes pass data only through VC sockets, not through call sockets. For example, a process may use one call socket to establish multiple VC sockets; these VC sockets are then used to communicate with different processes. A call socket may even be shut down once a virtual circuit connection is established without affecting communication between the processes. A virtual circuit has the following properties:
When a NetIPC process initiates a connection with a peer process, it must reference a call socket that was created by that peer process. In order to gain access to the call socket of another process, a NetIPC process must reference the socket name or the address of that call socket through IPCDEST. NetIPC processes associate ASCII-coded names with the call sockets they create and insert this information into the socket registry of their node. Each NS 3000/XL node has a socket registry that contains a listing of all the named call sockets that reside at that node. In keeping with the telephone analogy begun earlier, the socket registry could be compared to a telephone directory: a call socket is associated with a name and inserted in the local socket registry in much the same way as a telephone number is associated with a person's name and placed in a local telephone directory. NetIPC processes use the socket registry to access call sockets by passing a socket name and the corresponding node name to the socket registry software. The socket registry determines which socket is associated with the name specified and translates the address of that socket into a destination descriptor which it returns to the inquiring process. A destination descriptor is a data structure which carries address information. Specifically, when a destination descriptor is returned to a process, it tells the process:
NetIPC processes reference three types of descriptors: 1) call socket descriptors, 2) destination descriptors, and 3) virtual circuit socket descriptors. Descriptors are returned to processes when certain NetIPC calls are invoked (see Table 1-1 “Descriptor Summary”). The following is an explanation of the descriptors, the NetIPC call, or calls, that are used to obtain them, and the terminology used to refer to these descriptors in the syntax and parameter statements:
Table 1-1 Descriptor Summary
|
|