Download Message Passing Tools for Software Integration
Transcript
Chapter 3 The Connection Support Library Before messages can be sent among connected programs, these programs must be connected to each other. The goal of the connection support library is to provide a simple programming interface to network communication. 3.1 Connection Support The connection support library allows two running programs on the same machine or on different machines connected by a network to establish a full duplex communication channel over which data may be transferred. The library uses the Berkeley socket interface provided by the Unix operating system as an interface to the TCP/IP protocols. Sockets provide a level of abstraction which allows network I/O to be similar to file I/O. However, there are many more details and options involved with network I/O [Ste90], including addressing, as well as the wide range of communication protocols supported. By restricting the connection support library to two type of sockets, TCP sockets and Unix domain sockets, network communication and connection establishment can be greatly simplified. TCP sockets are used to establish reliable stream connections between two processes on different systems or two processes on a single system. TCP sockets use the underlying TCP/IP protocols, which are the protocols used by the Internet. As a result connections may be established between two programs connected by the Internet. Unix domain sockets may only be used to establish reliable stream connections between two processes on the Page 37