TCP/IP Sockets and Socket Pairs: Process and Connection Identification
(Page 2 of 2)
Socket Pairs: Connection Identification
So, the exchange of data between a pair of devices consists of a series of messages sent from a socket on one device to a socket on the other. Each device will normally have multiple such simultaneous conversations going on. In the case of TCP, a connection is established for each pair of devices for the duration of the communication session. These connections must be managed, and this requires that they be uniquely identified. This is done using the pair of socket identifiers for each of the two devices that are connected.
Let's return to the example we used in the previous topic (Figure 199). We are sending an HTTP request from our client at 220.127.116.11 to the Web site at 18.104.22.168. The server for that Web site will use well-known port number 80, so its socket is 22.214.171.124:80, as we saw before. We have been ephemeral port number 3,022 for our Web browser, so the client socket is 126.96.36.199:3022. The overall connection between these devices can be described using this socket pair:
For much more on how TCP identifies connections, see the topic on TCP ports and connection identification in the section on TCP fundamentals.
Unlike TCP, UDP is a connectionless protocol, so it obviously doesn't use connections. The pair of sockets on the sending and receiving devices can still be used to identify the two processes exchanging data, but since there are no connections the socket pair doesn't have the significance that it does in TCP.
Home - Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.