title: How TCP/UDP demultiplexing works?
body: <p>I have the following statement.</p>
  
  <p>"In TCP, the receiver host uses all of source IP, source port, destination IP and destination port to direct datagram to appropriate socket.  While in UDP, the receiver only checks destination port number to direct the datagram. "</p>
  
  <p>Is the above statement true? </p>
  
  <p>If yes, does it mean that in TCP the same port can be used for multiple socket in one process, while in UDP only one socket can use on a port in one process? What about sockets in different processes? Can multiple processes use the same port in TCP/UDP? (in programming language: C/C++/Java)</p>
  
  <p>If not, why? </p>