Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Understanding sockets concepts z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
A socket uniquely identifies the endpoint of a communication link between two application ports. A port represents an application process on a TCP/IP host, but the port number itself does not indicate the protocol being used: TCP, UDP, or IP. The application process might use the same port number for TCP or UDP protocols. To uniquely identify the destination of an IP packet arriving over the network, you have to extend the port principle with information about the protocol used and the IP address of the network interface; this information is called a socket. A socket has three parts: protocol, local-address, local-port. Figure 1 illustrates the concept
of a socket.
Figure 1. Socket concept
The term association is used to specify completely the two processes that comprise a connection: (protocol,local-address,local-port,foreign-address,foreign-port). The terms socket and port are sometimes used as synonyms, but note that the terms port number and socket address are not like one another. A port number is one of the three parts of a socket address, and can be represented by a single number (for example, 1028) while a socket address can be represented by (tcp,myhostname,1028). A socket descriptor (sometimes referred to as a socket number) is a binary integer that acts as an index to a table of sockets; the sockets are currently allocated to a given process. A socket descriptor represents the socket, but is not the socket itself. |
Copyright IBM Corporation 1990, 2014
|