Both Socket and Port are the terms used in Transport Layer. A port is a logical construct assigned to network processes so that they can be identified within the system. A socket is a combination of port and IP address. An incoming packet has a port number which is used to identify the process that needs to consume the packet.
The lowest numbered 1024 port numbers are used for the most commonly used services. These ports are called the well-known ports. Higher-numbered ports are available for general use by applications and are known as ephemeral ports.
|The word “Socket” is the combination of port and IP address.||The word “Port” is the number used by particular software.|
|It is used to identify both a machine and a service within the machine.||The same port number can be used in different computer running on same software.|
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Difference between Serial Port and Parallel Ports
- Difference between Secure Socket Layer (SSL) and Transport Layer Security (TLS)
- Difference between Secure Socket Layer (SSL) and Secure Electronic Transaction (SET)
- Difference Between Network Address Translation (NAT) and Port Address Translation (PAT)
- Difference between C and C#
- Difference Between Gi-Fi and Li-Fi
- Difference between 4NF and 5NF
- Difference between PNG and GIF
- Difference between CD and DVD
- Difference between T-SQL and PL-SQL
- Difference between GSM and LTE
- Difference between DVD-R and DVD-RW
- Difference between H.323 and SIP
- Difference between LAN and MAN
- Difference between USB 2.0 and USB 3.0
- Difference between Tor and VPN
- Difference between IBM DB2 and MS SQL
- Difference between HLP and PCP
- Difference between PIP and PCP
- Difference between PIP and HLP
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.