This is from the book: "Computer Networking - A Top Down Approach" :
One subtle difference between a TCP socket and a UDP socket is that a TCP socket is identified by a four-tuple: (source IP address, source port number, destination IP address, destination port number). Thus, when a TCP segment arrives from the network to a host, the host uses all four values to direct (demultiplex) the segment to the appropriate socket.1
So when I look at TCP headers, such as the one below, I do not see any IP parts in the header.
How does TCP use IP information when passing the data to the correct socket?
1Kurose, J. F., & Ross, K. W. (2013). Computer networking: A top-down approach. Boston, Mass: Pearson.